I've created and successfully tested a Function App. It requires the .net Framework because of a legacy library, and is set to use run-time version ~1. Publishing directly from Visual Studio 2017 using the publishing profile works normally. However, attempting to publish with the Azure CLI is giving me grief.
Following the MS article here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function-azure-cli
- azure-cli v2.0.64
- azure-functions-core-tools@2.7.1158 (npm)
- .NET Framework 4.8 DevPack
>func azure functionapp publish <myApp>
You're trying to publish to a v1 function app from v2 tooling.
You can pass --force to force update the app to v2, or downgrade to v1 tooling for publishing
How can I downgrade my tools?
From github seems to be that you need to install lower version like
To install v1 with npm:
The other way would be simply using msbuild
This will produce zip with you azure function