I always used to deploy my Azure Web App during development. I suddenly updated my Visual Studio 2022 (preview) and after publishing the following error appears on the Web App:
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
How do I debug this further? I tried using the console in Azure Portal, but I could not find .NET 6 anywhere on the Azure Web App. Or actually how do I match the version on the web app with my own version?? I have no clue where the runtime is installed on the Web App as I've previously mentioned.
CodePudding user response:
Based on the MS Doc .
This release is not "go-live" and not intended for use on production computers or for creating production code. For instructions on installing and updating Visual Studio 2022, see this documentation on updating Visual Studio 2022 to the most recent release.
For this error
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
You can try to Uninstall all the EF Core nuget packages
and reinstalling them.
For more information Please refer the below links:
. 500.31 ANCM Failed to Find Native Dependencies | MS DOC
.Troubleshooting 500.31 ANCM on Azure App Service | SO THREAD .
.Early Access Runtime | GitHub
CodePudding user response:
The solution was to go to the project folder/bin/Debug
or Release
according to your deployment selection in Visual Studio and then editing the projectnamehere.runtimeconfig.json
file to the correct version number.
You can figure out the correct runtime version number by going to wwwroot (should be the default path by default) via Console in Azure Portal and then executing dotnet projectname.dll
.
Case closed.