Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In Tools menu, under Options dialog box,

I need to select startup and in that need to set startup as empty environment in experimental instance of Visual Studio.

I need to do this through code, not through settings.

What I have tried:

C#
EnvDTE.DTE dte =
(EnvDTE.DTE)Package.GetGlobalService(typeof(EnvDTE.DTE));
 CommandBars commandBars = (CommandBars)dte.CommandBars;
 CommandBar toolsMenu = commandBars["Tools"];
 // Find the "Options" item in the "Tools" menu
 CommandBarControl optionsControl = null;
 foreach (CommandBarControl control in toolsMenu.Controls)
 {
     if (control.Caption == "&Options...")
     {
         optionsControl = control;
         break;
     }
 }


Able to go till options
Posted
Updated 1-Nov-23 10:17am
v2
Comments
Richard MacCutchan 31-Oct-23 8:36am    
And?
What happens when you run it?
Dave Kreskowiak 31-Oct-23 12:45pm    
Considering there's about a thousand options in the Tools->Options dialog, you're going to have to be a lot more specific about what you mean by "empty environment."
M Imran Ansari 2-Nov-23 17:26pm    
You didn't mentioned the problem area. What issue you ae facing?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900