I've been tasked with going through our codebase and migrating a bunch of internally developed applications from VS2012 to VS2022. (Early last year, I did the same to take VS2008 & VS2010 solutions up to VS2012.) Unfortunately, I'm not getting the expected upgrade prompt when I open the projects or solutions in VS2022, and I'm having difficulty figuring out why.
I have also tried using the devenv.exe /upgrade "path to .sln" method, but it doesn't appear to do anything at all.
So far, I've determined that I can make the solutions open in VS2022 by changing the top 3 lines of the solution file from:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
To:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32414.318
MinimumVisualStudioVersion = 10.0.40219.1
Is there something that I'm missing that I need to do to trigger the VS upgrade prompt? Is it actually safe to just make the updates to the solution file?
I'm a bit averse to manually editing solution files in case there are other changes that need to be made that I'm not aware of. Most of the projects are currently building against .NET Framework 4, but I should be be updating most of them to .NET Framework 4.8 in the process. (At least one that I'm aware of is still back on .NET Framework 2.0, and using an absolutely ancient version of a third-party framework that I expect to involve a major project to bring current.)
Note: I only have VS2012 and VS2022 installed on my system, and I do not have rights to install software.