none
VS2015 Enterprise - Crash Everytime I try to Publish ASP.NET Core RC2 Project, (PLEASE HELP!)

    Question

  • Whenever I try to publish my ASP.NET Core RC2 project, I VisualStudio 2015 ALWAYS crashes. This makes publishing my web app to Azure impossible.

    This is totally unacceptable and a serious block to our productivity. Someone needs to solve this.


    I attach the debugger to the crashing process and I get the following exception details:

    Object reference not set to an instance of an object.
    
    Microsoft.VisualStudio.Web.Azure.Publish
    
       at Microsoft.VisualStudio.Web.Azure.Publish.Model.SettingsTab.AppServicePublishSettingsTab.GetConnectionStrings(IAzureWebSiteInternal website)
       at Microsoft.VisualStudio.Web.Azure.Publish.Model.SettingsTab.AppServicePublishSettingsTab.<GetConnectionStringsForWebsite>b__13_1(Task`1 resource)
       at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.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.Web.Publish.Model.Database.DotNetCore.DotNetDatabaseSettings.<GetDefaultConnectionString>d__36.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at Microsoft.VisualStudio.Web.Publish.Model.Database.DotNetCore.DotNetDatabaseSettings.<LoadContextsAsync>d__38.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    


    Friday, May 27, 2016 8:27 PM

Answers

  • Hi Dustin. Thanks for the suggestion, unfortunately it didn't work.

    I did do a complete uninstall (vs_enterprise.exe /uninstall /force), and then individual uninstall of azure components, and then a complete wipe of the Visual Studio 14 folder in Program Files, and in Common. Then I reinstalled everything back, and now my publish dialog no longer crashes VS.

    Wasted many hours with the reinstall :/ but it did seem to solve it.

    • Marked as answer by A. Bhatnagar Monday, May 30, 2016 7:28 PM
    Monday, May 30, 2016 7:28 PM

All replies

  • I may have a solution. First, reset your publishing settings:

    Delete your local profiles:

    Create a new profile:

    I picked App Service and noticed my Microsoft login expired (probable original cause?) Anyway, I was able to configure my values, publish, and now I can open the profile dialog without error.

    • Proposed as answer by Dustin Meany Saturday, May 28, 2016 3:57 AM
    • Unproposed as answer by A. Bhatnagar Monday, May 30, 2016 7:25 PM
    • Proposed as answer by Dustin Meany Wednesday, June 01, 2016 5:35 PM
    Saturday, May 28, 2016 3:57 AM
  • Hi Dustin. Thanks for the suggestion, unfortunately it didn't work.

    I did do a complete uninstall (vs_enterprise.exe /uninstall /force), and then individual uninstall of azure components, and then a complete wipe of the Visual Studio 14 folder in Program Files, and in Common. Then I reinstalled everything back, and now my publish dialog no longer crashes VS.

    Wasted many hours with the reinstall :/ but it did seem to solve it.

    • Marked as answer by A. Bhatnagar Monday, May 30, 2016 7:28 PM
    Monday, May 30, 2016 7:28 PM
  • I'm sorry to hear that, there may have been something else wrong in your environment to cause the crash.

    I will say, today I was on a support call with Microsoft (unrelated to this issue), and when the tech support clicked on the Web Publish dialog, VS crashed for me again. I went to check the account settings, and lo and behold I was logged out of my account once again. Once I logged in, the Web Publish profile came up just fine without crashing.


    Monday, May 30, 2016 11:09 PM
  • That worked for me... Good looking out, and good hustle!
    Monday, June 20, 2016 4:56 AM