I have created an Azure function app, from my VS Code. This function is being deployed to Azure from VScode.
While Deployment Many times it returns "Error: Deployment ‘latest’ not found, While Deploying the Azure Function app" or "Error: The Operation was aborted", Even I haven’t aborted the Deployment. The latest version is always available to Azure there is no modification done via Azure Portal.
Are retrying few times the deployment is successful without returning any error. I have added some snapshot for better understanding.
2
Answers
VSCode gives such errors while deploying the function app using Command palette
azure functions: deploy to function app
orDeploy to function app
due to various reasons.In such cases, you can deploy the function to
Azure Function App
using the publish commandfunc azure functionapp publish <functionapp_name> --build remote
.AzureWebJobsStorage
application setting inlocal.settings.json
(if it is missing).To run the publish command, you must have Azure function core tools installed.
If you haven’t installed, open Terminal and run the command to install Core Tools:
VScode=>Terminal
and runfunc azure functionapp publish <functionapp_name>
.Portal:
I can confirm this happened to me while deploying with Azure Function Core Tools.
In my case, I managed to get past this issue by manually deleting the function (deactivating) the function inside the function_app.
Sometimes, I even tried to repeatedly to deploy it and it worked after some times (4th/5th attempt).
Pravallika KV’s answer is a good alternative indeed, in my case I didn’t have to resort to it.