title: get error Assets file 'obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.2'
body: <p>I upgrade my MVC Core Project from 2.2 to 3.0 with
  <a href="https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&amp;tabs=visual-studio" rel="nofollow noreferrer">microsoft</a></p>
  <p>and change many recommended here: <a href="https://stackoverflow.com/questions/58845286/after-upgrade-to-net-core-3-0-errorno-webpage-was-found-for-the-web-address-h/58845341#58845341">https://stackoverflow.com/</a></p>
  <p>It works fine when run it in Local, but when I want publish in local folder I get this error :</p>
  <blockquote>
  <p>Assets file 'obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.2'. Ensure that restore has run and that you have included 'netcoreapp2.2' in the TargetFrameworks for your project</p>
  </blockquote>
  <p>Ii have 3 projects and all of them upgrade to MVC core 3.0 also upgrade all packages to 3.0
  also remove object folder and bin folder and build projects again, close VS and open it again but the error stil exists.</p>
  <p><strong>UPDATE:</strong> mvc project csproj</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk.Web&quot;&gt;
  
  &lt;PropertyGroup&gt;
    &lt;TargetFramework&gt;netcoreapp3.0&lt;/TargetFramework&gt;   
  &lt;/PropertyGroup&gt;
  
  &lt;ItemGroup&gt;
   &lt;!--&lt;PackageReference Include=&quot;Microsoft.AspNetCore.App&quot; /&gt;--&gt;
    &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Identity.UI&quot; Version=&quot;3.0&quot; 
   /&gt;      
     &lt;PackageReference Include=&quot;Microsoft.VisualStudio.Web.CodeGeneration.Design&quot; 
  Version=&quot;3.0.0&quot; /&gt;
  &lt;/ItemGroup&gt;
  
  &lt;ItemGroup&gt;
    &lt;Folder Include=&quot;Areas\Admin\Data\&quot; /&gt;
    &lt;Folder Include=&quot;Areas\Admin\Models\&quot; /&gt;
   &lt;/ItemGroup&gt;
  
  &lt;ItemGroup&gt;
    &lt;ProjectReference Include=&quot;..\project.Model\project.Model.csproj&quot; /&gt;
    &lt;ProjectReference Include=&quot;..\project.Repo\project.Repo.csproj&quot; /&gt;
  &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>My project.Model.csproj</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
  &lt;PropertyGroup&gt;
    &lt;TargetFramework&gt;netcoreapp3.0&lt;/TargetFramework&gt;  
  &lt;/PropertyGroup&gt;
  
  &lt;ItemGroup&gt;
    &lt;PackageReference 
  Include=&quot;Microsoft.AspNetCore.Identity.EntityFrameworkCore&quot; Version=&quot;3.0.0&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Identity.UI&quot; Version=&quot;3.0.0&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.Design&quot; 
   Version=&quot;3.0.0&quot;&gt;
    &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
    &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; 
     buildtransitive&lt;/IncludeAssets&gt;
    &lt;/PackageReference&gt;
    &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.SqlServer&quot; 
   Version=&quot;3.0.0&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.SqlServer.Design&quot; 
   Version=&quot;1.1.6&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.Tools&quot; 
   Version=&quot;3.0.0&quot;&gt;
    &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
    &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; 
   buildtransitive&lt;/IncludeAssets&gt;
   &lt;/PackageReference&gt;
   &lt;/ItemGroup&gt;
  
   &lt;/Project&gt;
  </code></pre>