error MSB3105: The item "XXX.cs" was specified more than once in the "Sources" parameter.
See original GitHub issueWhile trying to build this PR https://github.com/Microsoft/Docker.DotNet/pull/144 for some reason it is thinking I have a duplicated file in the CI build at AppVeyor.
C:\Program Files\dotnet\sdk\1.0.0-preview5-004460\Roslyn\Microsoft.CSharp.Core.targets(71,5): error MSB3105: The item "AnonymousCredentials.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter. [C:\projects\docker-dotnet\Docker.DotNet\Docker.DotNet.csproj]
1.0.0-preview5-004232
build it just fine. However, the latest version 1.0.0-preview5-004460
throw this error for the same project…
Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
visual studio 2010 - error in csproj - duplicate item
The item "MyNewClass.cs" was specified more than once in the "Sources" parameter. Duplicate items are not supported by the "Sources" parameter.
Read more >The item was specified more than once in the sources parameter
The Item "C:\PathToproject\obj\CodeGen\MVC\Views\CustomWidgetName\default.cshtml.cs" was specified more than once in the "Sources" parameter
Read more >Error in csproj – duplicate item
I have error from visual studio 2010: Error 1 The item "CrossDomainService.svc.cs" was specified more than once in the "Sources" parameter.
Read more >The item \xxx\yyy.cs“ was specified more than once
I have following error : The item \xxx\yyy.cs“ was specified more than once in the ”Sources“ parameter. Duplicate items are not supported by ......
Read more >Resource error !Duplicate items are not supported by the " ...
admin.resources" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my case this was a problem as the .csproj.user file had a reference in it as well as the .csproj - so have a look in both files - if it exists in both this can cause the problem
The latest SDK adds all .cs files by default now without any “Compile” lines.
To fix the error either:
<EnableDefaultItems>false</EnableDefaultItems>
property in your .csproj.This experience will get better once #600 is fixed.