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.
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.