Melody's VSTA Blog

Get the latest and greatest information on VSTA here! Find new samples, workarounds, and inside tips in our downloads and blogs. Get your questions answered quickly in our forums or search our site for a FAQ. We're here to help- just ask.

Using VSTA v 2 with Visual Studio 2005

Microsoft recommends using Visual Studio 2008 for integrating VSTA v 2. However, if you choose to use Visual Studio 2005 the following will need to be addressed.

1)  The framework

VSTA v 2 uses the 3.5 framework. It is very important that references, like System.AddIn, point to the 3.5 versions and not the 2.0 versions.  The .Net 3.5 Framwork, or WinFX, is available for download through the MSDN download center.

2)  The proxy 

While Visual Studio 2008 is not a prerequisite for VSTA v 2, the proxy file generated by ProxyGen is designed to work with the updated compiler in Visual Studio 2008.  This updated compiler allows lambda expressions, which the proxy file may use.  There is a work around for this which allows the proxy to compile in Visual Studio 2005.

3)  The Visual Studio 2005 Command Prompt

The Visual Studio 2005 Command Prompt is set up to work with files predominately under the "%Program Files%\Microsoft Visual Studio 8" hierarchy.  VSTA v 2 works with the "%Program Files%\Microsoft Visual Studio 9.0" hierarchy.  I suggest using the regular system command prompt and manually changing directories to ensure you are working with the correct set of files.

4)  Add-Ins

VSTA v 2 add-ins may be opened with the VSTA v 2 IDE or Visual Studio 2008.  Attempting to open a VSTA v 2 add-in in Visual Studio 2005 will result in the error message "The selected file is a solution file, but was created by a newer version of this application and cannot be opened." 

 

In summary, Visual Studio 2005 can be used to integrate VSTA v 2 into a host.  Special steps need to be taken including verifying the versions of references,  changing the proxy, and ensuring the correct directories are used for commands.  Using Visual Studio 2008 allows you to skip these steps, open add-ins in Visual Studio, and use new technologies like WPF, WCF, and LINQ.

 

Published Tuesday, January 15, 2008 1:07 PM by Melody

Comments

  • No Comments
Anonymous comments are disabled