Is it somehow possible to change the project properties in debug section programmatically by EnvDTE classes? I know how to get the DTE instance and work with some of the settings, but I am blind or the debug section is just not accessible. I started from here http://msdn.microsoft.com/en-us/library/envdte.project.dte.aspx
You access project properties by right-clicking the project node in Solution Explorer and choosing Properties, or by typing properties into the search box on the menu bar and choosing Properties Window from the results. . NET projects might also have a properties node in the project tree itself.
In the Solutions Explorer window, right-click the exe project and then select Properties in the popup. Then change the Output type from Windows Application to Class Library.
You can find Properties Window on the View menu. You can also open it by pressing F4 or by typing Properties in the search box. The Properties window displays different types of editing fields, depending on the needs of a particular property.
EnvDTE80.DTE2 dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.12.0");
Project project = dte2.Solution.Projects.Item(1);
Configuration configuration = project.ConfigurationManager.ActiveConfiguration;
configuration.Properties.Item("StartAction").Value = VSLangProj.prjStartAction.prjStartActionProgram;
configuration.Properties.Item("StartProgram").Value = "your exe file";
configuration.Properties.Item("StartArguments").Value = "command line arguments";
The list of property names is here: http://msdn.microsoft.com/en-us/library/aa984055(v=vs.71).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With