Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Upgrading and Migrating Office Solutions

Upgrading and Migrating Office Solutions

If you have a Microsoft Office project that was created in an earlier version of Visual Studio, you must upgrade the project to use it in current versions of Visual Studio. To upgrade a Microsoft Office project, open it in a version of Visual Studio that includes the Microsoft Office developer tools. For more information about the versions of Visual Studio that include the Microsoft Office developer tools, see Configuring a Computer to Develop Office Solutions.

Note Note

Visual Studio cannot upgrade InfoPath form template projects that were created by using previous versions of Visual Studio. These types of projects are not supported in the current release of Visual Studio.

When you upgrade a Microsoft Office project, Visual Studio modifies the project to target the following items:

  • The Visual Studio 2010 Tools for Office Runtime. For more information, see Visual Studio Tools for Office Runtime Overview.

  • The current assembly references.

  • A version of the .NET Framework that is supported by the project type (When you upgrade to Visual Studio 2013 only).

  • A version of Microsoft Office that is supported by the project type (When you upgrade to Visual Studio 2013 only).

Visual Studio upgrades the following assembly references in the project:

  • Microsoft Office primary interop assemblies (PIAs).

  • Assemblies in the Visual Studio Tools for Office runtime. For more information about these assemblies, see Visual Studio Tools for Office Runtime Overview.

  • New or updated versions of dependent assemblies.

When you upgrade a project to Visual Studio 2013, Visual Studio modifies the project to target either the .NET Framework 4.5 or the .NET Framework 4. The version of the .NET framework targeted by the project depends on what version of Office is installed on your computer. If Office 2013 is installed, Visual Studio modifies the project to target the .NET Framework 4.5. Otherwise, Visual Studio modifies the project to target the .NET Framework 4.

Note Note

You might need to perform some additional steps to run a retargeted solution on development and end-user computers, and your project will no longer compile if it uses certain features. For more information, see Migrating Office Solutions to the .NET Framework 4 or later.

If you target the .NET Framework 4 or later in an Office project, you can use some features that are not available when you target the .NET Framework 3.5. For more information, see Designing and Creating Office Solutions.

When you upgrade an Office project to Visual Studio 2013, Visual Studio modifies the project to target a version of the Microsoft Office that is supported by the project type, such as a document-level customization project or VSTO add-in project.

Office projects in Visual Studio 2013 can target Office 2013 and Office 2010 applications. Visual Studio modifies the project to target the latest version of office that you have installed. If none of these versions of Office are installed, Visual Studio does not upgrade the project.

Note Note

If you upgrade an add-in project to target Office 2013 or later, make sure that the ThisAddIn_Startup event handler of the add-in doesn’t contain code that accesses a document in the application. For more information, see Accessing a Document when the Office Application Starts.

For document-level customizations, Visual Studio converts documents in a project that have a binary format, such as documents that have an .xls or .doc extension, to the Office Open XML format. For more information about Open XML, see Introduction to new file name extensions and Open XML Formats.

Note Note

Smart tags are deprecated in Excel 2010 and Word 2010. Therefore, if your solution uses smart tags, you must remove them before you can test and debug it in Visual Studio 2013 or Visual Studio 2015.

There are some additional considerations for upgrading document-level customizations and VSTO add-ins that target Microsoft Office 2003.

If the document in the project contains Windows Forms controls, you must also have the Visual Studio 2005 Tools for Office Second Edition Runtime installed before you upgrade the project. If this version of the runtime is not installed on the development computer before you upgrade the project, the upgraded project might contain compile or run time errors. After you finish upgrading the project, you can uninstall the Visual Studio 2005 Tools for Office Second Edition Runtime from the development computer if it is not being used by any other Office solutions. This version of the runtime is available as a redistributable package from the Microsoft Download Center at Microsoft Visual Studio 2005 Tools for Office Second Edition Runtime (VSTO 2005 SE) (x86).

If the solution file for your original project included a Setup or InstallShield Limited Edition project that was configured to install the VSTO add-in, Visual Studio upgrades the project, but it does not make any further changes to the project. If you want to keep using a Windows Installer file to deploy your add-in, you must modify the Setup or InstallShield Limited Edition project to install new pre-requisites such as the .NET Framework 4, the Visual Studio 2010 Tools for Office Runtime, and optionally the primary interop assemblies referenced by your add-in. For more information, see Deploying an Office Solution by Using Windows Installer.

If you want to use ClickOnce to deploy your add-in, you can delete the Setup or InstallShield Limited Edition project entirely. For more information about deploying add-ins by using ClickOnce, see Deploying an Office Solution.

Show:
© 2015 Microsoft