Reading the SDK- save yourself 160 pages.

In the VSTA SDK, from the section “Visual Studio 2005 Tools for Applications SDK” to “Tools- Project Template Generation tool (Projectgen.exe)” is about 250 pages (50K words)- probably too much to expect everyone to read to learn how to integrate VSTA.  So which sections should you read?  I would recommend starting with the “Getting Started- Overview of Integrating Visual Studio Tools for Applications” (this and all other sections referenced are under “Visual Studio 2005 Tools for Applications SDK”).  It gives you a very general overview of the steps of integrations, which are:

 

1.     Create proxies for your application's object model.

2.     Register your host application.

3.     Create project templates that add-in developers use to create add-ins for your application.

4.     Modify your host application so that it loads and unloads add-ins.

5.     Incorporate the redistributable integrated development environment (IDE) with your application.

6.     Optionally create in-process hosts, which you can use to extend the project system by automating the IDE.

7.     Modify the Setup program of the host application to install Visual Studio 2005 Tools for Applications and other files and settings on the end-user computer.

 

I would then check out “Creating Proxies using the Proxy Gen Tool (Proxygen.exe)” under the “Crating Proxies” section.  This gives you a basic idea of what ProxyGen does and how to use it.  Unfortunately, there isn’t a section on how to prepare your code for ProxyGen, which may need to be done.  A substitute for this is the “Tools- Proxy Generation Tool (Proxygen.exe)” section which offers a detailed account of how to use ProxyGen, what it does, and problems that will need to be address in the generated files (for example, it shows where naming collisions will occur).  This section is very detailed and can be left for the end if you are trying to get a general idea, but will be useful for an actual integration.  Also in the walkthroughs, an important procedure is outlined- using proxy gen to first create the descriptor file as output, then manually adding an entry point into the descriptor, and finally re-running proxy gen using the descriptor file as input.

 

The entire section on “Registering the Host Application” isn’t long (8 pages); however, the section, “How to:  Register the Host Application” accompanied by the chart of optional host configuration registry entries in “Host Registry Settings” is enough to get you through this step.  One necessary piece of info from the section “Host Registration”, if change anything in the VSTAHostConfig registries- delete the registry hive under VSTAHost and re-run the “vsta <HOSTID> /setup” command to re-create the registries with the changes.

 

For step 3, “create project templates” there is not a single article that I would say gives you all you need.  If you really want to know all the ins and outs of ProjectGen, read the entire section “Creating Project Templates” and play with the wizard.  If you just want to get through one integration, read the section “Walkthrough:  Creating a Project Template using the Projectgen.exe Wizard”.  This gives you enough information for most cases. 

 

Modifying the host application so that it loads and unloads add-ins is a complicated topic.  For an overview of it check out the sections “Add-in Management Overview” and “Walkthrough:  Modifying a Managed Application to Load Add-Ins” under “Loading and Unloading Add-Ins”.  If you don’t understand the walkthrough, try reading the “Host Item Provider Overview” and the “Type Maps Overview”, if you need more than the walkthrough provides, check out the “Advanced Add-in Management” section.

 

Under the “Incorporating the IDE” section, read the sections “How to:  Start the IDE”, “How to: Exit the IDE”, and “Add-in Debugging”.  These give you a very general easy to understand overview.  I didn’t care for the walkthrough in this section, but if you need more info look there.

 

Because the creating in-process hosts step is optional, I recommend leaving it until you need it.  If you are interested in creating in-process hosts, check out the “Walkthrough:  Creating and Updating an In-Process Host”.  It’s only 9 pages long and covers everything in the “In-Process Host Overview” section. 

 

The “Setup and Deployment” section is short and painless.  It gives important reminders such as change absolute paths to variables in the generated files, add the necessary dll’s to the GAC, and add the necessary registry entries on the target computer.

 

If you get through these sections you’ll have a pretty good understanding of how to integrate VSTA in only 90 pages (18K words).  Do this reading before or during a sample walkthrough and it will make much more sense.


Posted May 24 2007, 03:55 PM by Melody
Copyright Summit Software Company, 2008. All rights reserved.