Azure / Azure-Functions

1.11k stars 192 forks source link

VS2019 publish fail #1303

Open imtrobin opened 5 years ago

imtrobin commented 5 years ago

I'm opening a new issue as instructed, same issue as to this

https://github.com/Azure/azure-functions-host/issues/4578#issue-456472582

When I publish from VS2019, it fails, and the log file has not much info.

System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
   --- 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.<IsBuildCompletedSuccessfully>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.<DefaultCorePublishStep>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.<RunPublishTaskAsync>d__205.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---
System.Exception: Publishing failed.

VS 2019 Pro 16.2.2

I'm not using the new WebDeploy as zip, there is not WEBSITE_RUN_FROM_PACKAGE in my app settings I have reset "Reset publish credentials". I login from VS2019 Publish manually. I stopped the App, publish. No go.

I was able to publish before, but I think I was using vs2017 (on a different machine) a while ago.

sjkp commented 5 years ago

Is publishing from VS broken in general. I can't publish from VS2017 at all.

ColbyTresness commented 5 years ago

I can't repro this (No, publishing isn't broken in general). @soninaren @vijayrkn any thoughts on why this might have failed?

vijayrkn commented 5 years ago

Can we go to File -> Account Settings -> All Accounts & see if your account is logged in with the account that has the function app?

imtrobin commented 5 years ago

Yes, there is only 1 account there. and I have only 1 azure account only.

imtrobin commented 5 years ago

I was just working on another azure function project , where I deployed on vs2017 (on another machine) without problems. This machine which can't published is a new formatted PC with vs2019 only.

indcoder commented 4 years ago

Even I'm facing this issue. VS 2019 Azure functions.

22-10-2019 22:32:49 System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed. --- 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.b2() 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.d23.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__202.MoveNext() ---> (Inner Exception #0) System.Exception: Publishing failed.<---

System.Exception: Publishing failed.

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

Also the errors logged in the .tmp file is so generic, no meaningful debugging can be attempted with this info. The debug information in the .tmp file needs to be improved drastically

vijayrkn commented 4 years ago

Can you please provide some more details?

Version of VS? Version of the function app? sample csproj file Error details etc.

indcoder commented 4 years ago

Hi @vijayrkn ,

Version of VS is provided in original message : VS 2019 16.3.5 I'm trying something mentioned in .net conf 2019 https://github.com/xamarin/XamarinAzureChallenge

vijayrkn commented 4 years ago

Are there any errors in the output window?

indcoder commented 4 years ago

No errors ....only a warning

image

Joe-Code commented 4 years ago

Does anyone have a solution for this issue yet?

I'm using Visual Studio 2019, version 16.3.10 and I'm attempting to Publish an Azure Function to Azure. However, I receive the following error "Publishing failed":

11/25/2019 1:30:33 PM System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed. --- 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.b2() 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.d23.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__202.MoveNext() ---> (Inner Exception #0) System.Exception: Publishing failed.<---

System.Exception: Publishing failed.

Joe-Code commented 4 years ago

I found a suggestion here that worked for me.

My fix included, opening the Edit Azure App Service settings dialog from the Publish window, then make sure "WEBSITE_RUN_FROM_PACKAGE" = 0.