title: How to fix: Add a reference to ".NETFramework,Version=v4.7.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore?
body: <p>And yes, I have tried all similar QAs and nothing helped.</p>
  <p>What I have tried, none helped:</p>
  <ol>
  <li>Delete bin/ &amp; obj/</li>
  <li>Delete project.assets.json</li>
  <li>Delete .vs/</li>
  <li>Reset entire git repo</li>
  <li>Clean nuget caches</li>
  <li>Change .NetFramework version</li>
  </ol>
  <p>What I know:</p>
  <ol>
  <li>This happened to my colleague month ago on Win7, VS19 15.x, update did nothing. Thought she was crazy and fucked up something in system. Now happened to me, Win10, VS19, all up to date.</li>
  <li>Yesterday VS seamed slow, so I have deleted .vs, could be related.</li>
  <li>I have isolated first affected project, it is pure c# .net framework 4.7.1 lib, no other dependencies than system .net libs, does not have any nuget reference.</li>
  <li>After all that deleting and reseting one thing helped. I have renamed DotNetExtensions.csproj to DotNetExtensions1.csproj and now shit builds like a charm, but when I rename it back same error again.</li>
  </ol>
  <p>WTF? How is this possible? What else can i clean?</p>
  <p>Full log:</p>
  <pre><code>Rebuild started...
  1&gt;------ Rebuild All started: Project: DotNetExtensions, Configuration: Release Any CPU ------
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\NuGet\16.0\Microsoft.NuGet.targets(198,5): error : Your project does not reference &quot;.NETFramework,Version=v4.7.1&quot; framework. Add a reference to &quot;.NETFramework,Version=v4.7.1&quot; in the &quot;TargetFrameworks&quot; property of your project file and then re-run NuGet restore.
  ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
  </code></pre>