Migrating Office Solutions to the .NET Framework 4

If the target framework of an Office project is changed to the .NET Framework 4 from an earlier version of the .NET Framework, some additional steps might be required to continue to run the solution on development and end user computers. For more information, see Required Changes to Run Office Projects that You Migrate to the .NET Framework 4.

In addition, the project might no longer compile. Some features of Office projects have different programming models for different versions of the .NET Framework. When the target framework of an Office project is changed to the .NET Framework 4 from an earlier version of the .NET Framework, you must make the following code changes to the project:

The target framework of an Office project can change in the following scenarios:

  • You modify the project settings to change the target framework from the .NET Framework 3.5 to the .NET Framework 4. For more information, see How to: Target a Specific .NET Framework Version or Profile.

  • You upgrade an Office project from an earlier version of Visual Studio and the target framework of the project changes to the .NET Framework 4 because you do not have the .NET Framework 3.5 installed on the development computer. For more information, see Upgrading and Migrating Office Solutions.

For more information about why some features in Office projects have a different programming model when you target the .NET Framework 4, see Changes to the Design of Office Projects that Target the .NET Framework 4 and Visual Studio Tools for Office Runtime Overview.

See Also

Tasks

How to: Target a Specific .NET Framework Version or Profile

Troubleshooting Design Time Errors in Office Solutions

Troubleshooting Run Time Errors in Office Solutions

Concepts

Additional Support for Errors in Office Solutions

Other Resources

Designing and Creating Office Solutions