Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when trying to publish an azure function from Visual Studio

Tags:

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.

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

like image 267
Recusiwe Avatar asked Dec 06 '19 02:12

Recusiwe


People also ask

How do I publish a Visual Studio Azure function?

Use the following steps to publish your project to a function app in Azure. In Solution Explorer, right-click the project and select Publish. In Target, select Azure then Next. Select Azure Function App (Windows) for the Specific target, which creates a function app that runs on Windows, and then select Next.

What is Website_run_from_package?

Using WEBSITE_RUN_FROM_PACKAGE = URL. This section provides information about how to run your function app from a package deployed to a URL endpoint. This option is the only one supported for running from a package on Linux hosted in a Consumption plan.


1 Answers

Can you try this

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

like image 102
Sajeetharan Avatar answered Oct 11 '22 08:10

Sajeetharan