How to upgrade all solution projects .Net framework 4.5.1 to 4.8 Visual Studio 2019

mike picture mike · Dec 12, 2019 · Viewed 8.8k times · Source

I have a solution in Visual Studio 2019 with many C # projects. I need to retarget all of the projects from the .NET Framework 4.5.1 to 4.8. Is it possible to change target at once or do I have to do it separately with every single one of them?

PS: I tried 'TargetFrameworkMigrator', but it doesn't work with (VS2019) / .net 4.8.

Thank you for your help.

Answer

Igor Buchelnikov picture Igor Buchelnikov · Dec 12, 2019

Relplace all occurances of

<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>

with

<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>

in the all *.csproj files. You can use Notepad++ for it.