-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
error MSB3105: The item "XXX.cs" was specified more than once in the "Sources" parameter. #604
Comments
The latest SDK adds all .cs files by default now without any "Compile" lines. To fix the error either:
This experience will get better once #600 is fixed. |
AHHH, that is why :) I would suggest have a repo only for announcements just like asp.net guys did so, whenever a breaking change happen on public API surface, they push an issue there. Its a readonly repo where everyone who is using latest release watch it for news. Now I changed the AppVeyor script like this and the build work:
One caveat there. If I Thanks @eerhardt ! |
@eerhardt more one problem detected... Even if No files are loaded :( |
@srivatsn - thoughts?
That should work. @nguerrera @dsplaisted - any ideas why that would happen?
I assume that is because your install of VS2017 still has the old SDK, which doesn't automatically add the files. And since you removed them from your .csproj, when you load the project in VS2017, no one is adding the files. |
@eerhardt I just added the SDK install from https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-win-x64.latest.exe which is listed here https://github.com/dotnet/cli/#installers-and-binaries How to update the one Visual Studio is using? It is very confusing that command line is using one thing and Visual Studio using other (and yes, I have no global.json at the solution)... |
BTW, the announcements repo for aspnet is this one: https://github.com/aspnet/Announcements |
@galvesribeiro: hey, did u get around this?
@eerhardt: |
@describeme nop, still same problem. I had to rollback the SDK unfortunately... I'm waiting for the MSFT guys to ping us back with a solution for it. |
The SDKs, currently, ship with VS itself. Acquisition\upgrade of newer SDKs has not been implemented yet. dotnet/msbuild#1493 tracks the design and the work to do that. Until then, VS and CLI use their own SDKs. @galvesribeiro, you can set a property |
@srivatsn ok, thanks for the reply! Will try that and report back. Thanks! |
We've now added a warning for this scenario. Closing this issue. Please reactivate if you're still running into problems. |
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 |
Confirmed removing the Compile references from .csproj.user rather then .csproj resolved the issue keeping the .cs file available in Solution explorer. |
@ARMoir @stevescot Do you have a repro of this? |
@davkean Not exactly, I opened my project and it would not load error 'One or more projects in the solution were not loaded correctly. Please see the Output Window for details. root element missing' I realized .csproj.user was .csproj.user.bak so I removed the .bak (something like that) then the project opened but I got the 'specified more than once in the "Sources" parameter' until I removed the 'Compile' references from .csproj.user |
On linux this can happen when you have case duplicates e.g. |
While trying to build this PR dotnet/Docker.DotNet#144 for some reason it is thinking I have a duplicated file in the CI build at AppVeyor.
1.0.0-preview5-004232
build it just fine. However, the latest version1.0.0-preview5-004460
throw this error for the same project...Any ideas?
The text was updated successfully, but these errors were encountered: