此处发布了类似(不重复)的问题:如何以编程方式列出解决方案中的所有项目? https://stackoverflow.com/questions/3802027/reading-the-list-of-all-csproj-projects-of-solution-sln-programmatically
在我之前的问题中:如何安全地重命名公共项目中的类(由多个解决方案共享) https://stackoverflow.com/questions/5304017/how-to-safely-rename-a-class-in-common-project-shared-by-multiple-solutions, Thought https://stackoverflow.com/users/117095/thought建议创建一个单独的解决方案以包含引用我的 Common 项目的所有项目。
所以现在我需要在我的通用解决方案中添加/删除现有项目。目前,我有大约 50 个项目引用 Common 项目,因此如果我能够以编程方式从解决方案中添加/删除项目,那就太好了。
Thanks
我有同样的问题...
Project.Remove() 抛出 UnImplemented 异常
答案是使用:
解决方案::删除(Project prj); http://msdn.microsoft.com/en-us/library/envdte._solution.remove%28v=VS.100%29.aspx
and
解决方案::AddFromTemplate( string FileName, string Destination, string ProjectName, bool Exclusive) http://msdn.microsoft.com/en-us/library/envdte._solution.addfromtemplate%28v=VS.90%29.aspx
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)