Migrate Office solutions to the .NET Framework 4 or later
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
If the target framework of an Office project is changed to the .NET Framework 4 or later 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 or the .NET Framework 4.5.
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 or later from an earlier version of the .NET Framework, you must make the following code changes to the project:
Update Excel and Word projects that you migrate to the .NET Framework 4 or the .NET Framework 4.5
-
The target framework of an Office project changes when you upgrade that project from an earlier version of Visual Studio. For more information, see Upgrade and migrate Office solutions.
For more information about why some features in Office projects have a different programming model when you target the .NET Framework 4 or later, see Changes to the design of Office projects that target the .NET Framework 4 or the .NET Framework 4.5 and Visual Studio Tools for Office runtime overview.