错误 RG1000:未知的构建错误
C:\Program Files\MSBuild\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.Common.targets(625,5):错误 RG1000:未知的构建错误,“已添加具有相同密钥的项目”。 '
完成构建项目“FileName.csproj”——失败。
构建失败。
每当我尝试构建 soln 时都会收到此错误。
C:\Program Files\MSBuild\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.Common.targets(625,5): error RG1000: Unknown build error, 'An item with the same key has already been added.'
Done building project "FileName.csproj" -- FAILED.
Build failed.
Receive this error whenever i try building the soln.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
昨天我们遇到了同样的问题。这是在我们合并 TFS 中的两个分支之后发生的,因此我们查看了项目文件。项目文件中添加了两次相同的图像。如果您使用 XML 编辑器打开它,您可以查看如下部分:
删除重复的部分解决了我们的问题,但确实很难找到这种重复项。也许有一个更用户友好的选项,但我还没有找到。
感谢这篇博客文章,它在解决问题。在通过互联网搜索时,我还发现了 错误报告。也许值得一看。
看起来触发此错误的可能性也有很多。请参阅 Stack Overflow 上的以下问题:
We ran into the same problem yesterday. It happened after we merged two branches in our TFS, so we looked into the project file. There was twice the same image added to the project file. If you open that with an XML editor you could look to a part like this:
Removing the duplicate parts solved our problem, but is indeed hard to find this kind of duplicates. Maybe there is a more user friendly option, that I didn't find yet.
Credits to this blog-post that did a great deal in solving the issue. On my search through the internet, I also found a bug-report. Maybe it is worth looking to that.
It also looks like there are many possibilities to trigger this error. See the following questions here on Stack Overflow: