升级到 asp.net 核心 rc2 后发布到 Azure 应用服务崩溃
Publish to Azure App Service crashes after upgrade to asp.net core rc2
当我尝试将 Asp.net 核心 RC2 应用程序发布到 Azure 应用程序服务时,Visual Studio 会在我按下向导中的最后一个发布按钮时崩溃。在上一页上,我可以按预览,它会列出所有更改。有时甚至在我按下发布之前它似乎就崩溃了。
当我用 Visual Studio 的另一个实例调试崩溃时,我得到以下信息:
An unhandled exception of type 'System.InvalidOperationException'
occurred in PresentationFramework.dll
Additional information: DialogResult can be set only after Window is
created and shown as dialog.
或
An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll
我在安全模式下尝试了 运行 VS,但是当我进入发布向导时显示
The 'CommonAzureToolsPackage' package did not load correctly
在ActivityLog.xml我看到
823
2016/06/02 07:27:13.770
Error
VisualStudio
SetSite failed for package [CommonAzureToolsPackage][Object reference not set to an instance of
an object.]:{ at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.KeychainUtil.<<SetAccountManager>b__0>d__1.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.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.KeychainUtil.<GetVSAccountProviderAsync>d__4.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.VisualStudio.WindowsAzure.CommonAzureTools.KeychainEndpointProvider.<GetInstanceAsync>d__0.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.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.<CreateEndpointProviderList>d__3.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.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.<GetEndpointProviderAsync>d__0.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.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.GetEndpointProvider()
at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.<.ctor>b__1()
at System.Lazy1.CreateValue()
 at
System.Lazy
1.LazyInitValue()
at
System.Lazy1.get_Value()
 at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.<.ctor>b__2()

at System.Lazy
1.CreateValue()
at
System.Lazy1.LazyInitValue()
 at
System.Lazy
1.get_Value()
at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.<RegisterServices>b__61(IServiceContainer
c, Type t)
at
Microsoft.VisualStudio.Shell.Package.GetService(Type
serviceType)
at
Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type
serviceType)
at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.IServiceProviderExtensions.GetService[InterfaceType,ServiceType](IServiceProvider
serviceProvider)
at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.ServerExplorer.AzureNodeStateManager.Initialize(IServiceProvider
serviceProvider)
at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.InitializeAzureNodeStateManager()
at
Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.Initialize()
at
Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider
sp)}
{1E863AE9-93F6-42FD-A301-D3391F876208}
80004003 - E_POINTER
Object reference not set to an instance of an object.
刚刚注意到 如果我事先通过服务器资源管理器 -> Azure 向 Azure 进行身份验证,我将能够发布。
这是 Visual Studio Azure 工具中的错误,后来已修复。
当我尝试将 Asp.net 核心 RC2 应用程序发布到 Azure 应用程序服务时,Visual Studio 会在我按下向导中的最后一个发布按钮时崩溃。在上一页上,我可以按预览,它会列出所有更改。有时甚至在我按下发布之前它似乎就崩溃了。
当我用 Visual Studio 的另一个实例调试崩溃时,我得到以下信息:
An unhandled exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
Additional information: DialogResult can be set only after Window is created and shown as dialog.
或
An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll
我在安全模式下尝试了 运行 VS,但是当我进入发布向导时显示
The 'CommonAzureToolsPackage' package did not load correctly
在ActivityLog.xml我看到
823 2016/06/02 07:27:13.770 Error VisualStudio SetSite failed for package [CommonAzureToolsPackage][Object reference not set to an instance of an object.]:{ at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.KeychainUtil.<<SetAccountManager>b__0>d__1.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.VisualStudio.WindowsAzure.CommonAzureTools.Authentication.KeychainUtil.<GetVSAccountProviderAsync>d__4.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.VisualStudio.WindowsAzure.CommonAzureTools.KeychainEndpointProvider.<GetInstanceAsync>d__0.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.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.<CreateEndpointProviderList>d__3.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.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.<GetEndpointProviderAsync>d__0.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.VisualStudio.WindowsAzure.CommonAzureTools.EndpointProviderFactory.GetEndpointProvider() at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.<.ctor>b__1() at System.Lazy
1.CreateValue()
 at System.Lazy
1.LazyInitValue() at System.Lazy1.get_Value()
 at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.<.ctor>b__2()
 at System.Lazy
1.CreateValue() at System.Lazy1.LazyInitValue()
 at System.Lazy
1.get_Value() at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.<RegisterServices>b__61(IServiceContainer c, Type t) at Microsoft.VisualStudio.Shell.Package.GetService(Type serviceType) at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType) at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.IServiceProviderExtensions.GetService[InterfaceType,ServiceType](IServiceProvider serviceProvider) at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.ServerExplorer.AzureNodeStateManager.Initialize(IServiceProvider serviceProvider) at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.InitializeAzureNodeStateManager() at Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage.Initialize() at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)} {1E863AE9-93F6-42FD-A301-D3391F876208}
80004003 - E_POINTER Object reference not set to an instance of an object.
刚刚注意到 如果我事先通过服务器资源管理器 -> Azure 向 Azure 进行身份验证,我将能够发布。
这是 Visual Studio Azure 工具中的错误,后来已修复。