azure-functions-core-tools: Unable to publish .NET5 function app without forcing wrong worker runtime value
I’ve created a function app on azure using following command
az functionapp create --name <APP_NAME> --storage-account <STORAGE_ACC> --plan <SERVICE_PLAN> --resource-group <RESOURCE_GROUP> --runtime dotnet-isolated --runtime-version 5.0 --functions-version 3
Created a .NET5 function project using func init and selecting dotnet isolated option.
When I try to publish the app
func azure functionapp publish <APP_NAME>
I get following message:
Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnetIsolated' while your local project is set to 'None'.
If I specify the language in the end of the command
func azure functionapp publish <APP_NAME> --csharp
I still get the error: Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnetIsolated' while your local project is set to 'dotnet'..
So each time I deploy the function I have to use the --force switch and update the value on Azure Portal after the Function app is deployed.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 7
- Comments: 18
@gzdorik-brightgrove Have you changed to the build output directory or publish directory before you issue the
func azure functionapp publishcommand? Is thelocal.settings.jsonfile present in the directory? The only time I saw “Can’t determine project language …” message was when thelocal.settings.jsonfile was not present in the directory.For your information:
@RyanMarcotte I have been having the same issue, but have been using a cut down local.settings.json file in the same publish output directory:
As I expect the additional values, for AzureWebJobsStorage etc, would overwrite those already setup in Azure.
I only seem to have this problem when trying to deploy via azure pipelines. I can publish from my local machine without issue.