Why didn’t all my project files upgrade when moving from Visual Studio 2017 to Visual Studio 2019?

Since Visual Studio 2019 is binary-compatible with Visual Studio 2017, the Visual Studio 2017 libraries are used with Visual Studio 2019. However, one significant difference between the Visual Studio 2017 and Visual Studio 2019 libraries involves the Platform Toolset. The default Platform Toolset for Visual Studio 2017 is v141. The default Platform Toolset for Visual Studio 2019 is v142. 

There are two ways to upgrade the Platform Toolset. 

  1. Open the solution file with Visual Studio and follow the upgrade prompts, or

  2. On the Developer Studio command line, run: 

            devenv /upgrade <solutionFileName>

While the above two methods work for most situations, there are cases where Visual Studio fails to upgrade all of the projects within a solution. In these cases, you can either:

  • Build the solution from the command line using:

            msbuild  /p:PlatformToolset=v142' <solutionFileName>


  • Manually edit the project file(s) using a text editor or devenv /edit. Change all occurrences of '<PlatformToolset>v141</PlatformToolset>' to '<PlatformToolset>v142</PlatformToolset>' and save the project file(s).

Note: The method of using msbuild does not update the project file(s) on disk. It only overrides the platform toolset for the execution of the command. Use caution when editing project files manually. We recommend making a backup copy prior to editing project files.

Programming Language: