So my upgrade of DasBlog Core to .NET 6 was so smooth, I still think this is fairly cool given much of this code was developed under .NET 1.1. I was also pretty excited about the upgrade because I noticed that Azure App Services has day one support for .NET 6, so I thought let’s just do this!

Only one small hitch to speak of, when I started building using Azure DevOps I started to see the following error

error NETSDK1152: Found multiple publish output files with the same relative path

Showed up like this:

error-netsdk1152

Nothing rang a bell here, and I actually did not find an exact reference to this error number. What I did find was overlap with the error text relating to public output files (NETSDK1148). This error seems to be generated by the SDK when MSBuild detects duplicate files in the publish output but cannot figure out which file to keep (new to .NET 6).

I am gonna be honest with you I am unsure how to fix this problem, but I do know how to ignore it (story of my life). The newly introduced ErrorOnDuplicatePublishOutputFiles tells the build process not to generate the error. Added it to the Project file that is failing as follows:

<PropertyGroup>
  <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>

I do dislike this kind of black box solution so if someone actually knows what I need to resolve in my code to fix this issue correctly please share on Twitter or the the comments here.



Comment Section






Comments are closed.