title: The specified framework 'Microsoft.AspNetCore.All', version '2.2.0' was not found
body: <p><code>Dotnet --version</code> says 2.2.402</p>
  
  <p><code>dotnet --info</code> says</p>
  
  <pre><code>.NET Core SDK (reflecting any global.json):
   Version:   2.2.402
   Commit:    c7f2f96116
  
  Runtime Environment:
   OS Name:     centos
   OS Version:  7
   OS Platform: Linux
   RID:         centos.7-x64
   Base Path:   /usr/share/dotnet/sdk/2.2.402/
  
  Host (useful for support):
    Version: 2.2.8
    Commit:  b9aa1abc51
  
  .NET Core SDKs installed:
    2.2.402 [/usr/share/dotnet/sdk]
  
  .NET Core runtimes installed:
    Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  
  </code></pre>
  
  <p>I'm trying to publish my app on linux server which is working quite fine on server till my last try to update the application on server using the below command.</p>
  
  <p><code>dotnet publish -c release -o ${API_PUBLISH_DIR}</code></p>
  
  <p>the build process is throwing the following error </p>
  
  <blockquote>
    <p>It was not possible to find any compatible framework version
      The specified framework 'Microsoft.AspNetCore.All', version '2.2.0' was not found.
        - Check application dependencies and target a framework version installed at:
            /usr/share/dotnet/
        - Installing .NET Core prerequisites might help resolve this problem:
            <a href="https://go.microsoft.com/fwlink/?LinkID=798306&amp;clcid=0x409" rel="nofollow noreferrer">https://go.microsoft.com/fwlink/?LinkID=798306&amp;clcid=0x409</a>
        - The .NET Core framework and SDK can be installed from:
            <a href="https://aka.ms/dotnet-download" rel="nofollow noreferrer">https://aka.ms/dotnet-download</a></p>
  </blockquote>
  
  <p>more error details is.</p>
  
  <blockquote>
    <p>/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.aspnetcore.mvc.razor.viewcompilation/2.2.0/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets(64,5): error MSB3073: The command ""/usr/share/dotnet/dotnet" exec --runtimeconfig "/home/vng-dev/vng-web/vast-webapplication/vast_webapplication/WebAPI/bin/Release/netcoreapp2.2/WebAPI.runtimeconfig.json" --depsfile "/home/vng-dev/vng-web/vast-webapplication/vast_webapplication/WebAPI/bin/Release/netcoreapp2.2/WebAPI.deps.json" "/usr/share/dotnet/sdk/NuGetFallbackFolder/microsoft.aspnetcore.mvc.razor.viewcompilation/2.2.0/build/netstandard2.0/netcoreapp2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll" @"obj/Release/netcoreapp2.2/microsoft.aspnetcore.mvc.razor.viewcompilation.rsp"" exited with code 150. [/home/vng-dev/vng-web/vast-webapplication/vast_webapplication/WebAPI/WebAPI.csproj]</p>
  </blockquote>
  
  <p>I didn't mentioned the version in .csproj file for AspNetCore.All and it's like this</p>
  
  <p><code>&lt;PackageReference Include="Microsoft.AspNetCore.All"  /&gt;</code></p>
  
  <p>also tried replacing <code>AspNetCore.All</code> with <code>AspNetCore.App</code> like below</p>
  
  <p><code>&lt;PackageReference Include="Microsoft.AspNetCore.App"  /&gt;</code></p>
  
  <p>this also doesn't help</p>
  
  <p>I also tried with installing AspNetCore.MVC.Razor.ViewCompilation package but it doesn't help</p>
  
  <p><strong>EDIT:</strong></p>
  
  <ol>
  <li>Also tried updating the versions of both Microsoft.AspNetCore.App and Microsoft.AspNetCore.All one at a time.</li>
  <li>tried compiling the app with versions attribute and without versions attribute.</li>
  <li>Tried updating all the project (.csproj) files in the solution.</li>
  </ol>