gpt4 book ai didi

azure - Dotnet Core 2.0 Web 应用程序发布到 Azure 失败

转载 作者:行者123 更新时间:2023-12-03 02:59:44 26 4
gpt4 key购买 nike

来自VS 2017我尝试过:

  1. 在 Release模式和 Debug模式下构建都可以正常构建。
  2. 将 Build verbosity 设置为 Diagnostic,信息不多提示代码错误。

但是 .tmp 转储文件表明存在一些错误。我怀疑这些是 Visual Studio 内部错误:

5/4/2018 9:34:44 PM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish failed due to build errors. Check the error list 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.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass40_0.<PublishAsync>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.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__88.MoveNext()
---> (Inner Exception #0) System.Exception: Publish failed due to build errors. Check the error list for more details.<---

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

最佳答案

RazorCompileOnBuild 属性设置为 true 应该可以解决您的问题。

看看下面的question

关于azure - Dotnet Core 2.0 Web 应用程序发布到 Azure 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50179190/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com