Unknown Build Error RG1000

After manually merging a set of source changes to a .csproj file, my project would no longer build, giving this error:

Common.targets(588,5): error RG1000: Unknown build error, ‘An item with the same key has already been added.’

Not particularly helpful, especially if there are a large number of changes in the .csproj file. To get more information in such a case, in VS2010 you can go to Tools->Options->Projects and Solutions->Build and Run and set the MSBuild output verbosity to ‘Diagnostic’. After attempting to build again, the error now becomes much more useful:

Error 2 The item “ViewsFeedbackView.xaml.cs” was specified more than once in the “Sources” parameter. Duplicate items are not supported by the “Sources” parameter. C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.CSharp.targets 160 9 MyCompany.MyProduct.WebClient

Interestingly, after I reset the verbosity level back to Minimal (without making any code changes), the more detailed error still appeared. Weird.

2 thoughts on “Unknown Build Error RG1000

Comments are closed.