How to: Change the Target .NET Framework

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Document-level projects

  • Application-level projects

Microsoft Office version

  • Microsoft Office 2003

  • 2007 Microsoft Office system

For more information, see Features Available by Application and Project Type.

For Visual Studio Tools for Office, the default version of the Microsoft .NET Framework is version 3.5. However, you can set Microsoft Office 2003 solutions to use version 2.0, 3.0, or 3.5. Office solutions created for the 2007 Microsoft Office system must be developed for .NET Framework 3.5. 

Starting in Visual Studio 2008 Service Pack 1 (SP1), you can develop 2007 Microsoft Office solutions with .NET Framework version 3.5 or .NET Framework Client Profile. The .NET Framework Client Profile is a subset of the full .NET Framework 3.5 that has a size of 25-30 MB. For more information about the .NET Framework Client Profile, see .NET Framework Client Profile.

You can change the target .NET Framework without creating a new project. Visual Basic projects and C# projects have different procedures for changing the target .NET Framework.

Changing the Target .NET Framework for Visual Basic

To change the version of the .NET Framework for Visual Basic projects

  1. On the Project menu, click ProjectName Properties.

  2. Click the Compile tab.

  3. Click Advanced Compile Options.

  4. In the Target Framework (all configurations) list, select either .NET Framework 2.0, .NET Framework 3.0, or .NET Framework 3.5.

    Note

    For solutions that target the 2007 Microsoft Office system, you must use .NET Framework 3.5 or later.

  5. If you want to develop for .NET Framework Client Profile, specify this configuration:

    1. In the Target Framework (all configurations) list, select .NET Framework 3.5.

    2. Select Client-only Framework subset.

  6. Click OK.

  7. In the Target Framework Change message that appears, click Yes.

Changing the Target .NET Framework for C#

To change the version of the .NET Framework for C# projects

  1. On the Project menu, click ProjectName Properties.

  2. Click the Application tab.

  3. In the Target Framework list, select either .NET Framework 2.0, .NET Framework 3.0, or .NET Framework 3.5.

    Note

    For solutions that target the 2007 Microsoft Office system, you must use .NET Framework 3.5 or later.

  4. If you want to develop for .NET Framework Client Profile, specify this configuration:

    1. In the Target Framework (all configurations) list, select .NET Framework 3.5.

    2. Select Client-only Framework subset.

See Also

Concepts

Deploying Office Solutions (2003 System)

Deployment Overview (2003 System)

Change History

Date

History

Reason

July 2008

Added information about .NET Framework Client Profile.

SP1 feature change.