1
votes

I am using Visual studio Professional 2019 v 16.2.3 . I am using web deploy method to publish my azure function to azure portal. The publish is not working as it says

Publish has encountered an error. Publishing Failed.
A diagnostic log has been written to the following location : .tmp path is given

I have restarted Visual studio, restarted computer, cleared temp folder- all done several times. I have also searched for the solution on the internet but none of them worked to resolve this issue.

Can somebody please tell me on how to resolve this issue?

1
I've seen failures to publish under a couple of circumstances. 1. I've had strange file locks on the Azure Function itself. Stopping the function, publishing, and restarting has worked. 2. I've had timeouts when using zip or web deploy from Visual Studio if there's some ridiculously large DLLs that I'm trying to publish with the solution. - Rob Reagan
I've just started getting this across multiple Azure projects in the latest Visual Studio. Suspecting a recently introduced bug in VS rather than anything we've done wrong. Currently seems safe to ignore but is annoying. - Chris Sterling
You can try to use zip deploy. Web deploy is not a general deployment method for azure function. - Cindy Pau

1 Answers

0
votes

Please do not use web deploy, this is not a general deployment method for azure function.

You can try to use zip deploy directly to see whether it will give your some error.

First, zip the compiled files of your azure function app.

enter image description here

Then, run this command on your side:

az webapp deployment source config-zip --resource-group <group-name> --name <app-name> --src clouddrive/<filename>.zip

It will give you the details error if you failed.

This is the doc:

https://docs.microsoft.com/en-us/azure/app-service/deploy-zip#deploy-zip-file-with-azure-cli

Please have a try on your side.