Azure – Error when trying to publish an azure function from Visual Studio

azureazure-functionsvisual studio

I get the following error message when I try to publish my function using Visual Studio, any idea how to fix this?

System.AggregateException: One or more errors occurred. —>
System.Exception: Publish has encountered an error. We were unable to
determine the cause of the error. Check the output log for more
details. — End of inner exception stack trace — at
System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions) at
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken) at
Microsoft.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.b__2()
at System.Threading.Tasks.Task`1.InnerInvoke() at
System.Threading.Tasks.Task.Execute()
— End of stack trace from previous location where exception was thrown — at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
Microsoft.Publish.Framework.Model.DefaultPublishSteps.d__23.MoveNext()
— End of stack trace from previous location where exception was thrown — at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.d__213.MoveNext()
—> (Inner Exception #0) System.Exception: Publish has encountered an error. We were unable to determine the cause of the error. Check the
output log for more details. <—

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

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

Best Answer

Can you try this

Remove WEBSITE_RUN_FROM_PACKAGE setting entirely from Azure Functions Application Settings from Azure Portal.

Related Topic