Saturday, August 8, 2020

Visual Studio: C# projects changed to target .NET Framework 4.7.2 won't build

Upgrading an existing set of C# projects the following error was encountered while trying to build:
your project does not reference ".NETFramework,Version=v4.7.2" framework. Add a reference to ".NETFramework,Version=v4.7.2" in the "TargetFrameworks" property of your project file and then re-run NuGet restore

The solution is to delete the obj and bin folders of each project which fails to build with the above message.

No comments :

Post a Comment