Andrew Snigur
Andrew Snigur

Reputation: 143

Change Debug property of a Visual Studio project programmatically using EnvDTE

Is it possible to change the Debug property of a project programmatically using EnvDTE classes? I know how to get the DTE instance, but I don't know how to change the value of this option. I need to change this property to be able to programmatically remove the vshost.exe file.

Screenshot of the option in question:

enter image description here

Upvotes: 4

Views: 243

Answers (1)

Andrew Snigur
Andrew Snigur

Reputation: 143

If someone will need the answer

Project proj = dte.Solution.Projects.Item(1);
Configuration config = proj.ConfigurationManager.ActiveConfiguration;
config.Properties.Item("UseVSHostingProcess").Value = false;

Upvotes: 3

Related Questions