I just changed the target framework of all 11 projects in my Visual Studio 2017 solution from .NET 4.7 to .NET 4.7.1. But now, every single time I try to build, I get the following error from NuGet
1>------ Build started: Project: GS.Core, Configuration: Debug x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): error : Your project does not reference ".NETFramework,Version=v4.7.1" framework. Add a reference to ".NETFramework,Version=v4.7.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.
StopOnFirstBuildError: Build cancelled because project "GS.Core" failed to build.
Build has been canceled.
If I look in the .csproj file, I do see that the target framework has changed.
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
And I don't see a "TargetFrameworks" section, just "TargetFrameworkVersion"
Just for laughs I tried actually adding a key with that name, exactly as the error message specified.
<TargetFrameworks>.NETFramework,Version=v4.7.1</TargetFrameworks>
That was a bad idea. Visual Studio exploded when I tried to load it.
My default package management format is "PackageReference", if that matters.
I tried the fix listed in this question, but that had no effect.
Is there a way to fix this? I'm happy to manually edit project files if necessary. I would very much like to go to 4.7.1