The Guided Project Upgrade tool helps you upgrade projects in your solution one at a time and get them cross-compiling against both .NET 4.x and the newer targets. It is a migration option available alongside the “Migrate a Service” option.
When you upgrade a project, you can choose multiple target frameworks.
We’d recommend choosing .NET Standard 2.0 and seeing if that works. If your .NET application targets 4.7.2 or later, the .NET Standard 2.0 library should work with it. If you’re still targeting 4.7.1 or earlier, make sure to select that framework as well.
If .NET Standard 2.0 doesn’t compile, it might be worth checking .NET Standard 2.1 before diving in and fixing code.
Guided Project Upgrades tool window shows you which projects in your solution can be upgraded right now, which ones have already been upgraded, and which ones are dependent on other projects. The new SDK-style projects can’t have dependencies on the old-style projects, so you need to upgrade them in order.
Press the upgrade button next to each project, and Visual ReCode will generate the necessary code for that project. Those projects will then move to the “Upgraded” section. Any project in the “Dependencies require upgrade” section with its dependencies upgraded will be transferred to the “Ready to upgrade” section.
Detecting NuGet Package Compatability
The Upgrade Project wizard will automatically check all the NuGet packages for the project to see if they’re compatible with your chosen target frameworks. If any are not compatible, it will look for an upgraded version that is compatible.
Note that these upgraded versions may have breaking changes on rare occasions that could affect your code, especially if you’re making a big jump in versions.
If there is no compatible version of a NuGet package, that will require a solution that Visual ReCode cannot directly provide. Finding an alternative package that supports your target framework or sending a pull request to the package’s repository are good ways to start.