How to upgrade solution or project files Visual Studio? Use the “/upgrade” switch, or save the solution file again with “Save As”
Posted: (EET/GMT+2)
If you are migrating from older Visual Studio solutions or projects to the latest version, like Visual Studio 2017, you might want to upgrade your solution and project files to the latest versions. If you open a project or solution that requires immediate upgrade, Visual Studio presents you with a migration wizard, but you can also manually upgrade your projects.
There are two main ways to do this: launch devenv.exe (Visual Studio's main executable) with the "/upgrade" switch, or secondly, you can simply save the project or solution files again with the "Save As" command, which forces them to be written again. You can use the same filename with the "Save As" command. As always, using version control is suggested.
For information about the "/upgrade" switch, refer to Visual Studio's documentation. The "Save As" method requires no special instruction, and an example for a solution file is given below.
The old solution (.sln) file might start with similar to the following text:
Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010
And after you save it again (overwriting the existing file), the file becomes:
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.0.0 MinimumVisualStudioVersion = 10.0.40219.1
That is, the file format for the .sln did get upgraded.
Hope this helps!