Export (0) Print
Expand All

Considerations for Side-by-Side Framework Installations

Visual Studio 2005

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

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

If you have more than one version of the Microsoft .NET Framework installed on a computer that is running Visual Studio Tools for Office, Version 2003, solutions, there are some issues you must consider. Microsoft Office Word 2003 and Microsoft Office Excel 2003 load the latest version of the Microsoft .NET Framework before running managed code extensions. However, the Visual Studio .NET 2003 debugger requires the .NET Framework 1.1 to function correctly, and the security policy that is automatically set on the development computer is only set for the .NET Framework 1.1 when you create Visual Studio Tools for Office, Version 2003, solutions. If you have a later version of the .NET Framework installed on the development computer, debugging does not work as expected, and security policy is not set for the later version.

Debugging Visual Studio Tools for Office, Version 2003, Solutions

You must use a version of the debugger that matches the latest version of the .NET Framework that you have installed, or else specify in a configuration file that the Office application should load the .NET Framework 1.1.

Matching the Debugger to the Framework

If you use Visual Studio .NET 2003 to create Visual Studio Tools for Office solutions on a computer that has the .NET Framework 2.0 installed, you must use the debugger from Visual Studio 2005 or else download the debugger that comes with the .NET Framework 2.0 SDK. You then build the solution using Visual Studio .NET 2003, run it without starting the debugger, and then attach the debugger for the .NET Framework 2.0.

  1. Start the solution by clicking Start Without Debugging on the Debug menu in Visual Studio .NET 2003, or start Word or Excel and then open the solution's document.

  2. After the solution is running, start Visual Studio 2005, and click Attach to Process on the Tools menu.

  3. Select Winword or Excel in the Process list and then click Attach. The Visual Studio 2005 debugger opens attached to your solution.

If you instead want to start debugging before the document's Startup event is fired, the steps are different:

  1. Start Word or Excel and then open the solution's document (in order to get Word or Excel to load the .NET Framework 2.0).

  2. Close the solution's document but leave Word or Excel running.

  3. Attach to Winword or Excel with Visual Studio 2005.

  4. Open the solution's document again.

Specifying the Framework Version in a Configuration File

You can create a configuration file that uses the <supportedRuntime> element to specify the version of the .NET Framework that you want to load when you run your solution. This file must be in the same directory as WinWord.exe or Excel.exe, and therefore requires administrative privileges on the computer to install. Installing this file will cause all managed code in Word or Excel to run using the specified version of the Framework. If other managed code, such as an add-in, requires the later version of the .NET Framework, it will not run. For more information, see <supportedRuntime> Element.

Setting Security Policy

Visual Studio Tools for Office solutions check the security policy of the .NET Framework version for which they were created. That is, if a solution is created using Visual Studio Tools for Office, Version 2003, it always checks the .NET Framework version 1.1 for security policy. If a solution is created using Visual Studio 2005 Tools for Office, it always checks the .NET Framework version 2.0 for security policy. Because of this, users must always have the version of the .NET Framework installed for which the solution was created. In addition, when you want to set the security policy on end user computers, you must use the version of the security configuration tool that matches the version of the .NET Framework for which the solution was created.

If you upgrade a solution from Visual Studio Tools for Office, Version 2003, to Visual Studio 2005 Tools for Office and then redistribute it, you must also add new policy to the .NET Framework 2.0 on each end user computer to enable the solution to run. Visual Studio Tools for Office does not include any tools that will port security policy from one version of the .NET Framework to another version.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft