无法发布到 azure [英] Cannot publish to azure

查看:41
本文介绍了无法发布到 azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio Community Edition 开发了一个 Django 应用.

I have developed a Django app using Visual Studio Community Edition.

我无法将它部署到 Azure,得到一个包含以下异常的临时文件:

I am unable to deploy it to Azure, getting a temp file containing following exception:

02-07-2018 15:07:22 System.AggregateException:一个或多个错误发生了.---> System.Exception: 构建失败.检查输出窗口更多细节.--- 内部异常堆栈跟踪结束 --- 在System.Threading.Tasks.Task.ThrowIfExceptional(Boolean)includeTaskCanceledExceptions) 在System.Threading.Tasks.Task.Wait(Int32 毫秒超时,CancellationToken 取消令牌)在Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass41_0.b__2()在 System.Threading.Tasks.Task`1.InnerInvoke() 在System.Threading.Tasks.Task.Execute()--- 从上一个抛出异常的位置开始的堆栈跟踪结束 --- 在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)在Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.d__116.MoveNext()--->(内部异常 #0)System.Exception:构建失败.检查输出窗口以获取更多详细信息.<---

02-07-2018 15:07:22 System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window 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__DisplayClass41_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.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.d__116.MoveNext() ---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---

推荐答案

检查编译器错误!!您还有其他错误吗?

Check compiler errors!! Do you have other errors?

当您在调试模式下播放代码时,大多数代码错误是在运行时检测到的,因此除非运行代码,否则不会检测到代码,当您出于某种原因发布代码时,它会在发布之前检查所有 cshtml 是否有错误隐藏的错误可以被检测到,因此它不会被发布.我有同样的问题,我有不需要的 CSHTML 文件,我没有在我的代码中调用它,所以删除这些文件后,我的代码运行顺利.这不是发布的问题,但是您可以说您的代码中有未处理的错误,该错误在调试模式下显示为运行时但发布时为编译器错误

When you play code in debug mode, most of the code errors detected at runtime so the code won’t be detected unless it’s run it, when you publish your code for some reason, it check all cshtml for errors before publishing so hidden errors could be detected hence it won’t be published. I had the same problem and I had CSHTML files which I didn’t need and I didn’t call it in my code, so after deleting these file my code run smoothly. It’s not a problem with publishing, but you can say you have an unhandled error in your code, an error that appear as run time in debug mode but compiler error when you publish

这篇关于无法发布到 azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆