Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20 stars 16 forks source link

dotnet publish error: Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path #108

Open oyjonass opened 10 months ago

oyjonass commented 10 months ago

When i add this package i get error on dotnet publish

C:\x\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: C:\X\modules\_protected\Geta.NotFoundHandler.Optimizely\module.config, C:\X\.nuget\packages\geta.notfoundhandler.optimizely\5.0.8\contentFiles\any\any\modules\_protected\Geta.NotFoundHandler.Optimizely\module.config.

oyjonass commented 10 months ago

if i add this dotnet publish has no issues <Content Update="modules\_protected\Geta.NotFoundHandler.Optimizely\module.config" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="Never" />

I can not find anything about this in the doc, what am i missing here?

branchettiatnobia commented 1 month ago

we hade the same problem

j3rbr0wn commented 2 weeks ago

Adding this to csproj is also a solution:

<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>