1
votes

I've deployed my code to an app service using Azure Devops CI release agent. Once I browse to the App service, it shows this error, stating that .net 5 isn't installed, and lists what is.

'The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.'

The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

This is what I have selected in the app service configuration, as it looks to be the only .Net 5 option. enter image description here

1
Your project use .NET 5, but in settings you set .NET 5 (Early Access) which means Preview. I think this is an issue.Lukasz Szczygielek
That's what I thought too, but that's the only option for .net 5 for any region. So I'm not sure what to do at this point, as MS says .net 5 is supported...Dylan
Try deploying your app as self-contained, not as framework dependent.Muhammad Hannan
That may work, but it shouldn't have to be done?Dylan
@Hostel: .NET 5 (Early Access) is the correct setting. It allowed access to .NET 5 on the release date, and will continue to allow access to upcoming versions of .NET as they become available.Jeremy Caney

1 Answers

1
votes

Based on my test, the Azure App Service could support the .Net 5.

From the error message, it is indeed show that .net 5 hasn't been installed in the app service.

I could reproduce this issue too.

enter image description here

But when I select the .Net5 (Early Access) in Configuration and Save it, it will update the web app settings. Then the website could run successfully.

enter image description here

From your screenshot, you already selected this option. You could try to restart the App service and check if it could work.

On the other hand, you could try to create a new App Service with .Net5 (Early Access). Then you could directly use the App service with .Net 5.

enter image description here

Here is a ticket with the detailed introduction, you could refer to it.