I've updated my app from ASP.NET Core 2.2.0 to 3.1.2 and it does not run in Azure App Service any more.
The v3.1.2 runtime is not listed as supported on the App Service host machine. The Kudu api/diagnostics/runtime
call returns only older versions:
...
"dotnetcore32": {
"shared": {
"microsoft.netcore.app": [ "1.0.16", "1.1.13", "2.0.9", "2.1.14", "2.2.8", "3.0.2", "3.1.1" ],
"microsoft.aspnetcore.app": [ "2.1.14", "2.1.15", "2.2.8", "3.0.1", "3.0.2", "3.1.0", "3.1.1" ],
"microsoft.aspnetcore.all": [ "2.1.14", "2.1.15", "2.2.8" ]
},
"sdk": [ "1.1.14", "2.1.509", "2.2.109" ]
},
"dotnetcore64": {
"shared": {
"microsoft.netcore.app": [ "1.0.16", "1.1.13", "2.0.9", "2.1.14", "2.2.8", "3.0.2", "3.1.1" ],
"microsoft.aspnetcore.app": [ "2.1.14", "2.1.15", "2.2.8", "3.0.1", "3.0.2", "3.1.0", "3.1.1" ],
"microsoft.aspnetcore.all": [ "2.1.14", "2.1.15", "2.2.8" ]
},
"sdk": [ "1.1.14", "2.1.509", "2.2.109" ]
},
...
I thought I could fix that by deploying the app in self-contained mode. However the app now fails with:
System.InvalidOperationException: Startup assembly Microsoft.AspNetCore.AzureAppServices.HostingStartup failed to execute. See the inner exception for more details.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.AzureAppServices.HostingStartup, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.AzureAppServices.HostingStartup, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
I would like to know:
- Why the self-contained mode does not work?
- Is there any schedule for 3.1.2 runtime support on Azure App Service?
- I've seen ASP.NET Core runtime 3.1.2 listed among site extensions in Azure Portal, but installing it did not help. What is the extension for?