none
Visual Studio Enterprise 2015 Update 3 throws NullReferenceException when viewing "Extensions and Updates" options menu

    Question

  • When I navigate to Tools > Options > Extensions and Updates, Visual Studio 2015 Update 3 crashes with a NullReferenceException. I can see the following callstack both in Event Viewer and when debugging the exception in another instance of VS2015:

    Application: devenv.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
       at Microsoft.VisualStudio.ExtensionManager.VSPackage.ToolsOptionsPage.OnActivate(System.ComponentModel.CancelEventArgs)
       at Microsoft.VisualStudio.Shell.DialogPage+DialogSubclass.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
       at Microsoft.VisualStudio.Shell.Interop.IVsUIDataSource.Invoke(System.String, System.Object, System.Object ByRef)
       at Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(System.String, System.Object, System.Object ByRef)
       at Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(System.Object)
       at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
       at System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
    


    I assume it's something local to my environment but I can't figure out what's causing it or how to revert to a state that undoes the issue. I've run devenv.exe /ResetUserData and devenv.exe /ResetSettings to no avail. I've also uninstalled and reinstalled Visual Studio 2015. After doing that I can get to the "Extensions and Updates" once or twice but it doesn't let me add a new gallery. Eventually it starts throwing the NullReferenceException again.

    I'm open to any additional troubleshooting suggestions.


    • Edited by TimothyWittig Friday, December 30, 2016 9:07 PM Fixing formatting.
    Thursday, December 29, 2016 5:09 PM

Answers

All replies

  • Hi TimothyWittig,

    Thank you for posting in MSDN forum.

    >>I assume it's something local to my environment but I can't figure out what's causing it

    From your description, I agree with you that it's a possibility about it , since the re-installation doesn't work, have you recently installed any third-party add-in, updates or extensions that may affect the VS ?

    Or you could restart Windows  run devenv /safemode in Visual Studio 2015 Command Prompt.

    If in safemode this issue disappeared, the cause should be third-party applications, services or Visual Studio Add-ins. In this situation, you could go to the Extensions and Updates to uninstall those gallery one by one, check out which one that blocked this.

    Or you may try to running devenv.exe /log <log path> in Command Prompt, the log files will be generated in the <log path>., upload the file to https://onedrive.live.com/   and share the link with us.  I will try to help you find out the root cause according to the log.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, December 30, 2016 7:36 AM
    Moderator
  • Thanks for responding! I tried devenv /safemode as well and the issue persisted. I ended up adding the extension gallery I needed following this: https://msdn.microsoft.com/en-us/library/hh266735.aspx

    Accessing that menu still crashes but the above work around for adding galleries has allowed me to continue working.


    • Edited by TimothyWittig Friday, December 30, 2016 2:26 PM Making link text a hyperlink.
    • Marked as answer by TimothyWittig Friday, December 30, 2016 9:07 PM
    Friday, December 30, 2016 2:26 PM
  • Hi TimothyWittig,

    Glad to hear you have had your issue resolved. And thanks for sharing us your result here.

    Happy New Year :)

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 2, 2017 2:43 AM
    Moderator