c# - 发布到 Azure 时 Visual Studio 崩溃

标签 c# visual-studio azure visual-studio-2015

我在尝试将 WebApi 发布到 Azure 时遇到问题。它崩溃并重新启动我的 Visual Studio。我已修复 Visual Studio 2015、重新停用 Azure Tools、更新到 Azure Tools 2.9 和 Visual Studio Update 2,但它不断崩溃。 以下是我得到的日志:

<entry>
    <record>745</record>
    <time>2016/04/05 12:27:47.430</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [CommonAzureToolsPackage]</description>
    <guid>{1E863AE9-93F6-42FD-A301-D3391F876208}</guid>
  </entry>
  <entry>
    <record>746</record>
    <time>2016/04/05 12:27:47.529</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
    <guid>{9C987E78-F0BF-45CA-9BA5-96D3E4B2BAC6}</guid>
  </entry>
  <entry>
    <record>747</record>
    <time>2016/04/05 12:27:47.529</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Appid denied the loading of package</description>
    <guid>{9C987E78-F0BF-45CA-9BA5-96D3E4B2BAC6}</guid>
  </entry>
  <entry>
    <record>748</record>
    <time>2016/04/05 12:27:47.529</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Package failed to load; error message suppressed by skip flag</description>
    <guid>{9C987E78-F0BF-45CA-9BA5-96D3E4B2BAC6}</guid>
  </entry>
  <entry>
    <record>749</record>
    <time>2016/04/05 12:27:48.125</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [CommonAzureToolsPackage][Object reference not set to an instance of an object.]:{   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.KeychainUtil.&lt;&lt;SetAccountManager&gt;b__0&gt;d__1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.KeychainUtil.&lt;GetVSAccountProviderAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.KeychainEndpointProvider.&lt;GetInstanceAsync&gt;d__0.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.&lt;CreateEndpointProviderList&gt;d__3.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.&lt;GetEndpointProviderAsync&gt;d__0.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.GetEndpointProvider()&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.&lt;.ctor&gt;b__1()&#x000D;&#x000A;   at System.Lazy`1.CreateValue()&#x000D;&#x000A;   at System.Lazy`1.LazyInitValue()&#x000D;&#x000A;   at System.Lazy`1.get_Value()&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.&lt;.ctor&gt;b__2()&#x000D;&#x000A;   at System.Lazy`1.CreateValue()&#x000D;&#x000A;   at System.Lazy`1.LazyInitValue()&#x000D;&#x000A;   at System.Lazy`1.get_Value()&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.&lt;RegisterServices&gt;b__61(IServiceContainer c, Type t)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.GetService(Type serviceType)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.IServiceProviderExtensions.GetService[InterfaceType,ServiceType](IServiceProvider serviceProvider)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.ServerExplorer.AzureNodeStateManager.Initialize(IServiceProvider serviceProvider)&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.InitializeAzureNodeStateManager()&#x000D;&#x000A;   at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}</description>
    <guid>{1E863AE9-93F6-42FD-A301-D3391F876208}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo>Object reference not set to an instance of an object.</errorinfo>
  </entry>
  <entry>
    <record>750</record>
    <time>2016/04/05 12:27:50.737</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [CommonAzureToolsPackage]</description>
    <guid>{1E863AE9-93F6-42FD-A301-D3391F876208}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo>Object reference not set to an instance of an object.</errorinfo>
  </entry>
</activity>

最佳答案

我经历过许多与 Azure 发布相关的 VS 崩溃。我想说,在使用 Azure 的一年多里,VS 崩溃的次数比 VS 诞生以来的次数还多。我想说的是,在过去 6 个月左右的时间里,它们大部分已经随着 VS2015 消失了。

我可以说,避免崩溃的最大方法是确保在使用任何与 Azure 交互的东西之前通过 Azure 进行身份验证。我们遇到的另一个问题是使用与我们的域帐户同名的 MS 帐户,我们早在 AAD 出现之前就创建了它们。

关于c# - 发布到 Azure 时 Visual Studio 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36426647/

相关文章:

c# - 如何使用 Entity Framework 自动设置 DateUpdated 列?

c# - 以这种方式设计 ServicePointManager.ServerCertificateValidationCallback 的理由是什么?

c# - 是什么导致我的 UI 在关闭串行端口时卡住?

c# - 如何防止 Visual Studio 缩进换行符 (C#)?

visual-studio - 包含编译文件(增量构建)

azure - 具有对象 ID 的客户端无权在范围内执行操作或范围无效

C# Windows 10现代系统托盘菜单

c++ - 错误 C3867 : Functional call missing argument

azure - 如何在 Azure Windows Server 虚拟机中使用网络摄像头?

azure - 无法通过 C# 中的 Rest API 在 Azure 存储上获取/发布 Blob