Unable to publish .NET5 function app without forcing wrong worker runtime value
See original GitHub issueI’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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:18
Top Results From Across the Web
Troubleshoot error: Azure Functions Runtime is unreachable
The most common reason for this is that the function app has lost access to its storage account.
Read more >Migrate apps from Azure Functions version 3.x to 4.x
This article shows you how to upgrade your existing function apps running on version 3.x of the Azure Functions runtime to be able...
Read more >Your azure function app has functions_worker_runtime set ...
I encountered the same error when publishing a function using below command from Travis CI build. func azure functionapp publish <APP_NAME>.
Read more >Running (Mostly) Minimal .NET 6 APIs in Azure Functions
Up to .NET 5, the documentation stated that the only way to get a newer version of .NET running in the current stable...
Read more >The Good and the Bad of .NET Framework Programming
NET development platform is best served with Visual Studio IDE used for building, debugging, and publishing applications across all platforms ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gzdorik-brightgrove Have you changed to the build output directory or publish directory before you issue the
func azure functionapp publish
command? Is thelocal.settings.json
file present in the directory? The only time I saw “Can’t determine project language …” message was when thelocal.settings.json
file 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.