开发者

How to programmatically add/remove exsting projects to a solution?

开发者 https://www.devze.com 2023-02-17 21:51 出处:网络
A similar (not duplicate) question was posted at here: How do I p开发者_StackOverflow中文版rogrammatically list all projects in a solution?

A similar (not duplicate) question was posted at here: How do I p开发者_StackOverflow中文版rogrammatically list all projects in a solution?

In my previous question: How to safely rename a class in Common project (shared by multiple solutions), Thought suggested to create a separate solution to include all projects that reference my Common project.

So now I need to add/remove existing projects to my Common solution. I currently have about 50 projects reference the Common project, so it would be nice if I could programmatically add/remove projects from a solution.

Thanks


I had the same problem...

Project.Remove() throws UnImplemented exception

the answer is to use:

Solution::Remove(Project prj);

and

Solution::AddFromTemplate( string FileName, string Destination, string ProjectName, bool Exclusive)

0

精彩评论

暂无评论...
验证码 换一张
取 消