【发布时间】:2019-10-08 17:55:39
【问题描述】:
如何从 Visual Studio 2019 将 Azure Function App V2 部署到 Azure 中的现有 Linux Function App Plan?
当我从 Visual Studio 的发布对话框中选择“选择现有”时,我只能在连接的 Azure 订阅中看到我的基于 Windows 的功能,但我在同一订阅中创建的 Linux 功能丢失了。
当我下载函数应用的发布配置文件,导入它并尝试以这种方式发布时,我收到一个错误,这对恕我直言不是很有帮助:
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__202.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---
System.Exception: Publishing failed.
将 C# Azure Functions 发布到在 Linux 上运行的 Azure Functions 的方法是什么?
【问题讨论】:
-
发布时我也看不到 Visual Studio 上的 linux 应用程序。一定要用Visual Studio来部署吗?
-
可以使用cmd
-
我的解决方案解决了您的问题吗?
-
@BowmanZhu 谢谢你的建议!我会尽快尝试并报告。
标签: linux azure-functions publish