title: Deploy ASP.NET Core 6 app to existing Azure App Service?
body: <p>Based on today's announcement of the <a href="https://devblogs.microsoft.com/dotnet/announcing-asp-net-core-in-net-6/" rel="nofollow noreferrer">ASP.NET Core 6</a> release, it is my understanding that <a href="https://azure.github.io/AppService/2021/11/08/Dot.Net6.on.App.Service.html" rel="nofollow noreferrer">.NET 6 will be immediately available</a> (&quot;<em>day 0</em> support&quot;) on Azure App Services via Early Access:</p>
  <blockquote>
  <p>We are happy to announce that App Service is rolling out <em>day 0</em> support for <strong>.NET 6.0</strong> applications across all public regions and scenarios on both Windows and Linux App Service plans.</p>
  </blockquote>
  <p>After upgrading my ASP.NET Core application to ASP.NET Core 6, configuring my Azure App Service to use .NET 6, and publishing my application to my existing Azure App Service, however, I get an HTTP Error 500.31 with the specific message:</p>
  <blockquote>
  <p>The framework 'Microsoft.NETCore.App', version '6.0.0' (x64) was not found.</p>
  </blockquote>
  <p>Notably, the only .NET 6 runtime it lists as available is RC2 (<code>6.0.0-rc.2.21480.5</code>), not today's release version.</p>
  <h2>Upgrade Steps</h2>
  <p>To facilitate this, I performed the following steps:</p>
  <ul>
  <li><strong>Project file</strong> (<code>csproj</code>): Updated the <code>&lt;TargetFramework /&gt;</code> to target the <code>net6.0</code></li>
  <li><strong>Publishing profile</strong> (<code>pubxml</code>): Updated the <code>&lt;TargetFramework /&gt;</code> to target the <code>net6.0</code></li>
  <li><strong>Project file</strong> (<code>csproj</code>): Updated all <code>Microsoft.AspNetCore.*</code> <strong>NuGet packages</strong> to 6.0.0</li>
  <li><strong>Azure App Service Configuration</strong>: Updated the <em>.NET Version</em> to &quot;.NET 6 (Early Access)&quot;</li>
  </ul>
  <h2>Error Message</h2>
  <p>When accessing my Azure App Service site <a href="https://stackoverflow.com/a/60839746/3025856">with detailed errors enabled</a>, however, I receive the following error:</p>
  <blockquote>
  <h3>HTTP Error 500.31 - ANCM Failed to Find Native Dependencies</h3>
  <h4>Common solutions to this issue:</h4>
  <p>The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.</p>
  <h4>Specific error detected by ANCM:</h4>
  <pre><code>It was not possible to find any compatible framework version 
  The framework 'Microsoft.NETCore.App', version '6.0.0' (x64) was not found.
  
  The following frameworks were found: 
  2.2.14 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  3.0.3 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  3.1.15 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  3.1.18 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  5.0.7 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  5.0.9 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  6.0.0-rc.2.21480.5 at [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
  
  You can resolve the problem by installing the specified framework and/or SDK. 
  
  The specified framework can be found at:
  https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&amp;framework_version=6.0.0&amp;arch=x64&amp;rid=win10-x64
  </code></pre>
  </blockquote>
  <h2>Additional Information</h2>
  <ul>
  <li>I've restarted my Azure App Service (obviously!)</li>
  <li>I've waited (more than an hour) for the runtime to be installed via Early Access</li>
  <li>I am publishing my web application using the <code>Framework-dependent</code> deployment mode</li>
  <li>I do not have any .NET runtimes configured via Azure App Service Extensions</li>
  <li>I do not have <code>AspNetCoreModule</code>(<code>V2</code>) configured (as was required for ASP.NET Core 3)</li>
  <li>This Azure App Service Plan is located in the South Central US region</li>
  <li>I am publishing from today’s release of Visual Studio 2022</li>
  </ul>
  <h2>Mixed Messages</h2>
  <p>While the <a href="https://azure.github.io/AppService/2021/11/08/Dot.Net6.on.App.Service.html" rel="nofollow noreferrer">Azure App Service update</a> cited above suggests that there will be &quot;<em>day 0</em> support&quot;, <a href="https://devblogs.microsoft.com/dotnet/announcing-asp-net-core-in-net-6/#azure-functions-web-apps-and-static-web-apps-support-net-6" rel="nofollow noreferrer">the ASP.NET Core 6 announcement</a> is less committed:</p>
  <blockquote>
  <p>At the time of this post, .NET 6 is being actively deployed to the worldwide network of servers and configured to build and run .NET 6 apps… which should conclude by the end of this week</p>
  </blockquote>
  <p>I would assume that the Azure update on GitHub would be the most authoritative source, but perhaps there are problems with the rollout that haven't yet been acknowledged by the Azure team?</p>
  <h2>Related Topics</h2>
  <p>I previously posted two questions related to publishing previous early releases of ASP.NET Core web applications to Azure App Services, and have followed the resolutions relevant to those posts, to no avail:</p>
  <ul>
  <li><a href="https://stackoverflow.com/q/59171630/3025856">Error publishing an ASP.NET Core 3.1 site to Azure from Visual Studio 2019</a></li>
  <li><a href="https://stackoverflow.com/q/64777919/3025856">Deploy ASP.NET Core 5 app to existing Azure App Service?</a></li>
  </ul>
  <h2>Question</h2>
  <p>How can I deploy a release version of an ASP.NET Core 6 app to an Azure App Service using the Early Access program? Is this even ready yet (as per <a href="https://azure.github.io/AppService/2021/11/08/Dot.Net6.on.App.Service.html" rel="nofollow noreferrer">the Azure App Service announcement</a>)? Or do we need to wait until the end of week (as per <a href="https://devblogs.microsoft.com/dotnet/announcing-asp-net-core-in-net-6/#azure-functions-web-apps-and-static-web-apps-support-net-6" rel="nofollow noreferrer">the ASP.NET Core 6 announcement</a>)?</p>
  <p>Ideally, I’d like to take advantage of Early Access without either distributing the runtime with my application (as a self-contained distribution) or installing the runtime via an extension. Obviously, those remain options, but the premise of Early Access is that they shouldn’t be necessary.</p>