Hi @Olivier Cochet the error message you shared means that your Azure App Service application requires the .NET runtime version 7.0 (v7.0), but the application pool in your Azure App Service is currently configured for the .NET runtime version 4.0 (v4.0). To resolve this issue, you have a few options:
- Update Existing App Service:
You can update the existing App Service to use the correct .NET runtime version.
Azure Portal:
- Navigate to the Azure Portal.
- Go to your App Service.
- In the left-hand menu, click on "Configuration."
- In the "General settings" section, look for the ".NET version" setting.
- Change the setting to ".NET 7 (LTS)" or the appropriate version.
Azure CLI:
- Use the Azure CLI to update the .NET runtime version:
az webapp config set --name <your-app-name> --resource-group <your-resource-group> --net-framework-version "v7.0"
Azure DevOps Pipeline:
- If you're deploying through Azure DevOps, make sure your release pipeline sets the correct .NET version during deployment.
- Create a New App Service:
If updating the existing App Service is not feasible, you might consider creating a new App Service with the desired .NET version:
Azure Portal:
- Create a new App Service.
- During the creation process, specify the correct .NET version.
Azure CLI:
Use the Azure CLI to create a new App Service:
az webapp create --name <new-app-name> --resource-group <your-resource-group> --plan <your-app-service-plan> --runtime "DOTNET|7.0"
Hope that helps.
Grace