Reputation: 81
I have upgraded my Web API from version netcoreapp3.1 to version net6.0. When I launch it from Visual studio as localhost, it will launch successfully.
I have published the app to the azure app service to which it was previously published. Publish is successful. When I launch the URL I get the below error
" HTTP Error 500.31 - ANCM Failed to Find Native Dependencies Common solutions to this issue: The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found. Specific error detected by ANCM: Error: An assembly specified in the application dependencies manifest (Microsoft.AspNetCore.AzureAppServices.HostingStartup.deps.json) was not found: package: 'Microsoft.Extensions.Logging.AzureAppServices', version: '6.0.1' path: 'lib/net6.0/Microsoft.Extensions.Logging.AzureAppServices.dll' "
I checked dotnet --info command, .net 6 framework is installed.
Anyone has faced a similar issue? Could you please help me with this
If I create a new app service and host my upgraded api, it works fine. But if I host my api to existing app service, it shows the same error. I have compared the configuration of both the app service and also the dotnet --info, they all are same.
I am using an extension "ASP.NET Core Logging Integration" in my app service. It was not updated to the latest version. Updating the extension to the current latest version that is v 6.0.2 fixed the issue. Thank you all.
Upvotes: 1
Views: 8663
Reputation: 9839
I got this error when I upgraded my aspnetcore web api and published it to our azure app service. I solved the problem by changing the runtime version in the app service config and deleting all the files and folders in the appservice using the command line console in the app service.
Upvotes: 1
Reputation: 252
You will see similar error if you upgrade to .net7. The error shows that you are missing some library components on your server.
If you are using IIS services, in addition to the installing the latest .net runtime (or SDK) on your server, you'll also need to install the web hosting components: Publish an ASP.NET Core app to IIS | Microsoft Learn.
Upvotes: 0
Reputation: 81
I am using an extension "ASP.NET Core Logging Integration" in my app service. It was not updated to the latest version. Updating the extension to the current latest version that is v 6.0.2 fixed the issue. Thank you all.
Upvotes: 2