The below has been tested with a newly created Azure Functions project targeting .NET Core 3.1 that is then converted to .NET 5 using the steps in this blog post. The project is able to run locally, but attempting to publish it fails. More specifically:
Attempting to run func azure functionapp publish <FunctionAppName>
returns the following error:
Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnet' while your local project is set to 'None'.
You can pass --force to update your Azure app with 'None' as a 'FUNCTIONS_WORKER_RUNTIME'
Attempting to run func azure functionapp publish <FunctionAppName> --csharp
appears to work (since the following is displayed)