Azure Function Publish issue from Visual studio 2022

Akhilesh Vikram Singh 5 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,883 questions
{count} vote

2 answers

Sort by: Most helpful
  1. navba-MSFT 23,620 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.

    1 person found this answer helpful.

  2. SvenGlöckner 441 Reputation points
    2024-06-19T12:33:53.7133333+00:00

    I'm getting this error

    System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

    bei Microsoft.WebTools.Azure.Functions.Publish.NewFx.Profiles.BaseFunctionsUpdatePublishStep.SplitSettingsIntoUpdateGroups(IReadOnlyDictionary2 configToVerify, List1& settingsToUpdate, List`1& settingsToRemove)

    bei Microsoft.WebTools.Azure.Functions.Publish.NewFx.Profiles.UpdateFunctionAppSettingsPublishStep.<UpdateWebSettingForFunctionsAsync>d__13.MoveNext()

    --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---

    bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    bei Microsoft.WebTools.Azure.Functions.Publish.NewFx.Profiles.UpdateFunctionAppSettingsPublishStep.<PostPublishUpdateWebSettingsAsync>d__9.MoveNext()

    --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---

    bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    bei Microsoft.WebTools.Azure.Functions.Publish.NewFx.Profiles.UpdateFunctionAppSettingsPublishStep.<RunAsync>d__8.MoveNext()

    --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---

    bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    bei Microsoft.Publish.Framework.Profiles.ProjectProfilesManager.<RunPublishStepsAsync>d__44.MoveNext()

    ===================

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.