This documentation is archived and is not being maintained.

How to: Upgrade Document-Level Projects

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005


    Visual Studio Team System

  • Microsoft Office 2003

After you upgrade from Visual Studio Tools for Office, Version 2003 to Microsoft Visual Studio 2005 Tools for the Microsoft Office System (VSTO 2005), you can open and run your existing projects in Visual Studio and they will be upgraded to work the same way they did when using Visual Studio Tools for Office, Version 2003. However, to complete the upgrade so that you can take advantage of the new project system and tools, you must perform some upgrade steps manually. For more information, see Upgrading Document-Level Projects Overview.

To upgrade a Visual Studio Tools for Office solution

  1. Open an existing solution in Visual Studio with VSTO 2005 installed.

    The Visual Studio Conversion Wizard appears.

  2. Read the information and warnings on the first screen, and then click Next.

  3. If you want to create a backup of your solution, select Yes, create a backup before converting and specify a location for the backup files. If you do not want to create a backup, select No.

  4. Click Next.

  5. Click Finish if everything on the summary page is correct.

    A dialog box appears with information about default properties for project debugging.

  6. Click Yes to upgrade to the new default project debugging properties. If you click No, your project will not compile until you make changes manually.

  7. Click the link to the conversion report to see details on the conversion status, or else click Close.

    The solution opens with the new project system visible in Solution Explorer, plus the files from the old version of the solution.

  8. Move your code from the old main class file into the new ThisDocument, ThisWorkbook, and Sheet classes.

  9. Delete your old main class file after you remove all the code.

  10. Update any unqualified reference to Application with the fully qualified namespace System.Windows.Forms.Application. For more information, see "Updating Your Code" in Upgrading Document-Level Projects Overview.

  11. Replace all ActiveX controls in the document or workbook with managed controls from the Visual Studio Toolbox.

See Also