As the title says, whenever I try to install an extension for Visual Studio 2019 the VSIX Installer gives the error message: Object reference not set to an instance of an object
. I found some similar posts but nothing that was quite like what's happening here. I've tried deleting certain folders in Appdata/Local
, tried running devenv /resetuserdata
in the console. Although nothing seems to work, so I was curious if anybody else has had this issue and any ideas on how to possibly fix it?
Picture of VSIX with Error Message
Install Log:
1/11/2021 12:59:18 PM - -------------------------------------------
1/11/2021 12:59:18 PM - vsixinstaller.exe version:
1/11/2021 12:59:18 PM - 16.8.3036
1/11/2021 12:59:18 PM - -------------------------------------------
1/11/2021 12:59:18 PM - Command line parameters:
1/11/2021 12:59:18 PM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\vsixinstaller.exe,/appidinstallpath:F:\VSCODEIDE\Common7\IDE\devenv.exe,/skuName:Community,/skuVersion:16.8.30804.86,/appidname:Microsoft Visual Studio Community 2019,/culture:en-US,/noep,C:\Users\xxxxxxx\AppData\Local\Temp\VSIXpg4jcyqq.vsix
1/11/2021 12:59:18 PM - -------------------------------------------
1/11/2021 12:59:18 PM - Microsoft VSIX Installer
1/11/2021 12:59:18 PM - -------------------------------------------
1/11/2021 12:59:18 PM - System.NullReferenceException: Object reference not set to an instance of an object.
at VSIXInstaller.SetupExtensions.GetLaunchableInstances(IQuery query)
at VSIXInstaller.SupportedSKUs.EnumerateIsolatedInstalls(Action`1 callback)
at VSIXInstaller.SupportedSKUs.AddInstalledLocationBasedSKUs(IntPtr userToken)
at VSIXInstaller.SupportedSKUs.InitializeSupportedSKUs(IntPtr userToken)
at VSIXInstaller.ExtensionService.InitializeSupportedSKUs(ICommandLineData cmdLineData, IntPtr duplicatedUserToken)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
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 Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
To add an answer here for more community members handle similar issues.
Thanks to ErikEJ for sharing the solution.
Since your VS has broken, you could repair vs from vs_installer that actually solves your issue.