在VS2010中删除项目依赖项时出错 [英] Error while removing project dependency in VS2010

查看:67
本文介绍了在VS2010中删除项目依赖项时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有许多项目的大型解决方案。
有些项目依赖于其他项目(尽管从来没有循环依赖)。

I have a large solution with number of projects. Some the projects depend on others (never a circular dependency though).

当我尝试删除项目的依赖项时,出现一条错误消息,例如依赖项是由项目系统添加的,无法删除。此错误的原因是什么?我该如何解决?

When I tried to remove a dependency of a project, I am getting an error message like "The dependency was added by the project system and cannot be removed". What is the cause for this error? How I can solve this?

推荐答案

当我尝试手动编辑由CMake系统生成的项目/解决方案时,有时会遇到此问题。我手动解决它:

I sometimes get this problem when I try to manually edit projects/solutions generated by our CMake system. I solve it manually:


  • 在您喜欢的文本编辑器中打开相关的.vcproj文件。

  • 找到< ProjectReference>

  • 删除整个< ProjectReference>标记,该标记对应于您要删除的依赖性(标记的include属性将包含依赖性项目的名称)。元素(即,以< ProjectReference>开头,以< / ProjectReference>包括结尾)。保存文件。

  • 重新加载解决方案。

  • Open the dependent .vcproj file in your favorite text editor.
  • Find <ProjectReference> tag corresponding to the dependency you want to remove (the include attribute of the tag will contain the name of the dependency project).
  • Remove the whole <ProjectReference> element (i.e. starting with <ProjectReference> and ending with </ProjectReference> inclusive). Save the file.
  • Reload the solution.

这篇关于在VS2010中删除项目依赖项时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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