title: Assets file project.assets.json doesn't have a target for 'net6.0' - VS2022
body: <p>Just a few days ago got this error, after updating to Visual Studio Community 2022 v17.2 (from v17.1.6):</p>
  <p>Error NETSDK1005
  Assets file 'C:.........XXXXXX.Web\obj\project.assets.json' doesn't have a target for 'net6.0'. Ensure that restore has run and that you have included 'net6.0' in the TargetFrameworks for your project. XXXXXX.Web C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 267</p>
  <ul>
  <li>Uninstalled everything related with VS2022 + Installer</li>
  <li>Rebooted</li>
  <li>Fresh Git Cloned the project I'm working on (I work on several computers all with Win 10 and all with the latest updates, this is the only VS installation that presents this problem)</li>
  <li>Reinstalled VS 2022 v17.2 (with .NET 6.0, the usual install)</li>
  </ul>
  <p>The .csproj file has everything in place:</p>
  <pre><code>&lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;net6.0&lt;/TargetFramework&gt;
      &lt;RuntimeIdentifiers&gt;win-x86;win-x64&lt;/RuntimeIdentifiers&gt;
      &lt;IsPackable&gt;false&lt;/IsPackable&gt;
      &lt;SpaRoot&gt;ClientApp\&lt;/SpaRoot&gt;
      &lt;DefaultItemExcludes&gt;$(DefaultItemExcludes);(SpaRoot)\**\node_modules\**;&lt;/DefaultItemExcludes&gt;
      &lt;AspNetCoreHostingModel&gt;OutOfProcess&lt;/AspNetCoreHostingModel&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  <p>Always delete the 'bin' and 'obj' folders before build or rebuild....</p>
  <p>Cannot get away with the compilation, and always receiving that NETSDK1005 error...</p>
  <p>Getting desperate :(</p>
  <p>Thanks in advance for any help</p>
  <p>P.S. - already checked question <a href="https://stackoverflow.com/questions/70711153/assets-file-project-assets-json-doesnt-have-a-target-for-net6-0-windows10-0-19/">70711153</a></p>