How to Update 70 Projects to .Net 4.8 With Ease?

In this spring cleaning we had to update our last application to .Net 4.8. Unfortunately, the project is rather big:

The solution has 70 projects.

The good news was that the projects are on .Net 4.7.2 and there are no breaking changes. Still, updating 70 projects by hand is nothing I look forward to. Luckily for us, there is a Visual Studio extension called Target Framework Migrator (GitHub, Visual Studio Marketplace) that helps with this task.

After installing the extension and restarting Visual Studio, you find it in the Tools menu:

Go to Tools / Target Framework Migrator to run it

We can select the projects we want to upgrade and choose the target version:

Our projects are on .Net 4.7.2 before we update them

After we hit Migrate, we have time to drink a coffee:

70 projects take their time and we see a lot of the running dialog

The Target Framework Migrator took around 10 minutes and then all projects where on .Net 4.8:

After the update everything is on.Net 4.8

 

Conclusion

Target Framework Migrator is a great help when you need to migrate from one version to another in the .Net full framework. Updating 70 projects without a problem was a well-received surprise. I hope they follow along with their roadmap and support .NET Core and .NET Standard projects soon.

2 thoughts on “How to Update 70 Projects to .Net 4.8 With Ease?”

  1. I am wondering is this the right way to upgrade? what about other dependencies and packages that are available via the NugetPackageManager ?
    They also should be upgraded .
    I have like 20+ external libraries like NewtonSoft, Polly, FlaUI ,so on and so forth

    Also this extension isn’t available at Visual Studio Marketplace and the link downloads the vsix but VS doesn’t let it get installed

    Reply
    • Hi Apoorv,
      You mix two different steps to update an application. One is the packages; another part is the .Net framework itself. This post is about upgrading .Net and for that part the described way is correct. You can do it manually or use the tool (by the way, the link to the Marketplace still works, but it is not an extension and therefore you need to download it by yourself and not inside Visual Studio). To install it, make sure you checked the option to trust the package in the file properties.

      To upgrade the packages, you can use Visual Studio’s feature “Manage NuGet packages for Solution” to upgrade everything in one go (see https://improveandrepeat.com/2018/01/consolidate-the-nuget-packages-in-your-solution/ ).

      I hope this clears things up a bit.

      Regards,
      Johnny

      Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.