错误 RG1000:未知的构建错误 [英] error RG1000: Unknown build error

查看:33
本文介绍了错误 RG1000:未知的构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C:\Program Files\MSBuild\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.Common.targets(625,5): 错误 RG1000: 未知的构建错误,'具有相同密钥的项目已经存在已添加.

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.'

完成构建项目FileName.csproj" -- 失败.

Done building project "FileName.csproj" -- FAILED.

构建失败.

每当我尝试构建解决方案时都会收到此错误.

Receive this error whenever i try building the soln.

推荐答案

我们昨天遇到了同样的问题.它发生在我们合并 TFS 中的两个分支之后,因此我们查看了项目文件.项目文件中添加了两次相同的图像.如果你用 XML 编辑器打开它,你可以看到这样的部分:

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 whit an XML editor you could look to a part like this:

<ItemGroup>
  <Resource Include="Assets\Images\icon.png">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Resource>
</ItemGroup>

删除重复部分解决了我们的问题,但确实很难找到这种重复部分.也许有一个更用户友好的选项,我还没有找到.

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.

看起来也有很多可能会触发此错误.在 Stack Overflow 上查看以下问题:

It also looks like there are many possibilities to trigger this error. See the following questions here on Stack Overflow:

这篇关于错误 RG1000:未知的构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆