【问题标题】:VSIX Installer gives error "Object reference not set to an instance of an object."VSIX 安装程序给出错误“对象引用未设置为对象的实例”。
【发布时间】:2021-04-16 19:21:40
【问题描述】:

正如标题所说,每当我尝试为 Visual Studio 2019 安装扩展时,VSIX 安装程序都会给出错误消息:Object reference not set to an instance of an object。我发现了一些类似的帖子,但没有什么与这里发生的事情完全一样。我尝试删除Appdata/Local 中的某些文件夹,尝试在控制台中运行devenv /resetuserdata。虽然似乎没有任何效果,所以我很好奇是否有其他人遇到过这个问题以及关于如何解决它的任何想法?

Picture of VSIX with Error Message

安装日志:

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)

【问题讨论】:

  • 修复你的 VS 实例

标签: visual-studio visual-studio-2019 visual-studio-extensions vsix


【解决方案1】:

在此处添加答案,以便更多社区成员处理类似问题。

感谢 ErikEJ 分享解决方案。

由于你的 VS 坏了,你可以repair vs from vs_installer 真正解决你的问题。

【讨论】:

    猜你喜欢
    • 2020-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-04
    • 2011-07-09
    • 2012-08-31
    • 2011-11-21
    • 2012-10-01
    相关资源
    最近更新 更多