Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Jan 8, 2024 · 3 comments

Comments

@oyjonass
Copy link

oyjonass commented Jan 8, 2024

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
Copy link
Author

oyjonass commented Jan 8, 2024

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
Copy link

we hade the same problem

@j3rbr0wn
Copy link

j3rbr0wn commented Nov 1, 2024

Adding this to csproj is also a solution:

<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants