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

VS unfortunately doesn't provide an easy way for .NET framework, and every project file has it's own setting. So the easiest way is probably a "Edit -> Find and Replace- > Replace in Files" on the directory in VS or any text editor you like.

For Framework projects, in every .csproj you want <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> (from <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>), if you have any packages.config, there is targetFramework="net48" (from targetFramework="net451"). You will need to reload the solution after changing for VS to see them.


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.


So i gone through the PR's on Git, so you are not alone. Someone has already posted a release package which works for .NET 4.8 with VS2019

Here is the OPEN PRs, which is waiting to be merged

4.7

4.8 and VS 2019

release for VS2019 which actually works, according to the commit and comments. Give it a try