Azure Function Publish issue from Visual studio 2022

Akhilesh Vikram Singh 0 Reputation points
2023-09-26T13:25:51.8466667+00:00

Publish has encountered an error.

Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.

A diagnostic log has been written to the following location:

"C:\Users\XXX\AppData\Local\Temp\1\tmp190B.tmp"

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,301 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 17,280 Reputation points Microsoft Employee
    2023-09-27T04:01:21.57+00:00

    @Akhilesh Vikram Singh Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand that you are encountering the error Publish has encountered an error while publishing your Function App to Azure.

    Please try the below action plan for now:

    1. Open the "C:\Users\XXX\AppData\Local\Temp\1\tmp190B.tmp" file and check if anything useful in the error message.

    2.Try tweaking the below setting during the publishing and check if that helps ?

    User's image

    1. Check if deploying to a newly created function app works fine.

    4.Try the deployment using func core tools. Install the Azure Function Core tools if its not yet done. Then to publish your local code to a function app in Azure, use the func azure functionapp publish publish command, as in the following example:

    func azure functionapp publish <FunctionAppName>

    More Info here.

    5.Try the FTPS deployment settings by getting the publishing profile from the portal and check if that helps.

    6.Try the deployment using the Azure CLI to trigger push deployment as explained here.

    If you still encounter the same issue after following the above action plans, please do let me know. I would be happy to assist you further.

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.