Azure Function App - Publish failed
I fixed this issue by setting WEBSITE_RUN_FROM_PACKAGE
to 0
on the application settings. I was uploading the function files by syncing a WebDeploy package from Azure DevOps to the App Service file system and not running it from the .zip package.
On https://docs.microsoft.com/bs-cyrl-ba/azure/azure-functions/run-functions-from-deployment-package explains about running Functions from a deployment package and all the benefits of doing it this way, but then remember to:
- Just upload the .zip deployment package to
d:\home\data\sitepackages
(don't use the msdeploy verb "sync" to sync the file system at wwwroot) - Add a packagename.txt containing only the name of the package file in folder, without any whitespace
Go to azure portal, stop the function app, publish from vs, then start again.
Don't know if this is closed but I had same issue while deploying new SDK version to an older azure function app. Here is what I did: Instead of downloading deployment profile from Azure portal, created a new one with visual studio automated deployment. This is important- While deploying from Visual studio it should ask you to upgrade version of deployed app, click yes and your app will get deployed.