VSTA DTEProvider has the ability to launch Visual Studio

In VSTA 2.0, you can use DTEProvider to launch Visual Studio instead of VSTA, which can be helpful for debugging or provide additional functionalities for users who already have Visual Studio installed. For example, in ShapeAppCSharpMacroRecording sample, in EnsureIDE function of VstaDesignTimeIntegration.cs you can change the code of

IDTEProvider dteProvider = 
(IDTEProvider)
new
VSTADTEProviderClass(); this.dte = (EnvDTE.DTE)dteProvider.GetDTE
(
"ShapeAppCSharp", 0);

to

IDTEProvider2 dteProvider2 = 
(IDTEProvider2)
new
VSTADTEProviderClass(); this.dte = (EnvDTE.DTE)dteProvider2.GetVSDTE
(
"ShapeAppCSharp", 0);
Now Run ShapeApp, launch IDE and Visual Studio will be launched.

Read the complete post at http://blogs.msdn.com/vsta/archive/2009/05/17/vsta-dteprovider-has-the-ability-to-launch-visual-studio.aspx


Posted May 17 2009, 07:24 PM by Visual Studio Tools for Applications
Filed under:
Copyright Summit Software Company, 2008. All rights reserved.