less than 1 minute read

Yesterday I updated the Contacts to .NET 5. Now the process was pretty easy, you can watch the video here, however once published to Azure App Service I got the following error.

HTTP Error 500.31

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.

This reminded of something that Scott Hunter mentioned at .NET Conf. Azure App Service supports .NET 5, just not by default.

That reminded me that I had to check the configuration of the App Service to change it to enable support for .NET 5. It’s was pretty easy to do.

  • Log in to your portal
  • Navigate to your App Service
  • Click on Configuration

Configuration Setting

Under Stack Setting, change the following

Setting Value
Stack .NET
.NET Framework Version .NET 5 (Early Access)

.NET 5 App Service Stack Settings

  • Click Save
  • Then go back to the Overview and restart the App Service.

After refreshing your browser, the error should go away and the application load.

References