Visual Studio 2019(社区版)- 无法 install/update 扩展
Visual Studio 2019 (Community Edition) - Cannot install/update Extensions
这是我在 Intel i3 笔记本电脑上全新安装 Windows 10(64 位)时全新安装的 Visual Studio 2019 Community Edition。
每当我尝试安装扩展(例如,CodeMaid)时,我都会收到 COM ClassID not found 错误。我不确定为什么会出现此错误。从 google 搜索和参考一些文章后,我认为这个错误是由于 64 位机器上的 32 位 COM。 Visual Studio 尝试在 64 位注册表下查找 COM CLASSID,但失败了,因为它可能在 32 位注册表下。这只是一个大胆的猜测。
补充一下,“帮助”下的“报告问题”对我也不起作用,但 NuGet 包管理器运行良好;我可以下载和引用 NuGet 包。不确定这是否与扩展有关,但只是为您保留此信息。
请帮我解决这个错误。
我正在复制我在尝试安装 CodeMaid 扩展时遇到的错误的完整错误日志。这肯定不是特定于扩展程序的错误,因为当我尝试更新“Live Share”等扩展程序时遇到了同样的错误。
查看以下错误日志了解详情:
07-10-2020 16:14:08 - Microsoft VSIX Installer
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:08 - vsixinstaller.exe version:
07-10-2020 16:14:08 - 16.7.3069
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:08 - Command line parameters:
07-10-2020 16:14:08 - C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\vsixinstaller.exe,/appidinstallpath:C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\devenv.exe,/skuName:Community,/skuVersion:16.7.30523.141,/appidname:Microsoft Visual Studio Community 2019,/culture:en-US,/noep,C:\Users\Ruturaaj\AppData\Local\Temp\VSIX50es31ad.vsix
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:08 - Microsoft VSIX Installer
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:09 - Initializing Install...
07-10-2020 16:14:10 - Extension Details...
07-10-2020 16:14:10 - Identifier : 4c82e17d-927e-42d2-8460-b473ac7df316
07-10-2020 16:14:10 - Name : CodeMaid
07-10-2020 16:14:10 - Author : Steve Cadwallader
07-10-2020 16:14:10 - Version : 11.1.209
07-10-2020 16:14:10 - Description : CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
07-10-2020 16:14:10 - Locale : en-US
07-10-2020 16:14:10 - MoreInfoURL : http://www.codemaid.net/
07-10-2020 16:14:10 - InstalledByMSI : False
07-10-2020 16:14:10 - SupportedFrameworkVersionRange : [4.7.2,)
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - SignatureState : Unsigned
07-10-2020 16:14:10 - Supported Products :
07-10-2020 16:14:10 - Microsoft.VisualStudio.Community
07-10-2020 16:14:10 - Version : [15.0,17.0)
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - References :
07-10-2020 16:14:10 - Prerequisites :
07-10-2020 16:14:10 - -------------------------------------------------------
07-10-2020 16:14:10 - Identifier : Microsoft.VisualStudio.Component.CoreEditor
07-10-2020 16:14:10 - Name : Visual Studio core editor
07-10-2020 16:14:10 - Version : [15.0,)
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - Signature Details...
07-10-2020 16:14:10 - Extension is not signed.
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at VSIXInstaller.LocationBasedSKU..ctor(String appidInstallPath, String appidName, Version vsVersion, String edition, String rootSuffix)
at VSIXInstaller.LocationBasedSKU..ctor(String appidInstallPath, String appidName, Version vsVersion, String edition, String rootSuffix, IntPtr alternateUserToken)
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.ComputeInstallableExtensions(IStateData stateData, Boolean isRepairSupported, Boolean isExtensionPack, IDictionary`2 skuDataMapping, IList`1 installableExtensionsPaths)
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 时,您可以在您的 PC 上对 VS 进行深度清理,然后重新安装它。
卸载时请输入C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe
至运行程序。它将卸载所有 VS2017 和 VS2019 版本以及整个数据。
如果卸载VS2019还不行,可以试试这个
此外,
删除 C:\Users\xxx(当前用户)下的 16.0_xxxx
等文件夹\AppData\Local\Microsoft\VisualStudio`。
完成后,确保没有你当前VS2019版本的文件夹(community*professional**企业*) C:\Program Files (x86)\Microsoft Visual Studio19
.
====================================
然后, right-click on the vs_installer
-->点击运行 as administrator然后像这样安装相关的扩展开发工作负载:
最后,安装完成后,请再次测试。
这是我在 Intel i3 笔记本电脑上全新安装 Windows 10(64 位)时全新安装的 Visual Studio 2019 Community Edition。
每当我尝试安装扩展(例如,CodeMaid)时,我都会收到 COM ClassID not found 错误。我不确定为什么会出现此错误。从 google 搜索和参考一些文章后,我认为这个错误是由于 64 位机器上的 32 位 COM。 Visual Studio 尝试在 64 位注册表下查找 COM CLASSID,但失败了,因为它可能在 32 位注册表下。这只是一个大胆的猜测。
补充一下,“帮助”下的“报告问题”对我也不起作用,但 NuGet 包管理器运行良好;我可以下载和引用 NuGet 包。不确定这是否与扩展有关,但只是为您保留此信息。
请帮我解决这个错误。
我正在复制我在尝试安装 CodeMaid 扩展时遇到的错误的完整错误日志。这肯定不是特定于扩展程序的错误,因为当我尝试更新“Live Share”等扩展程序时遇到了同样的错误。
查看以下错误日志了解详情:
07-10-2020 16:14:08 - Microsoft VSIX Installer
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:08 - vsixinstaller.exe version:
07-10-2020 16:14:08 - 16.7.3069
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:08 - Command line parameters:
07-10-2020 16:14:08 - C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\vsixinstaller.exe,/appidinstallpath:C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\devenv.exe,/skuName:Community,/skuVersion:16.7.30523.141,/appidname:Microsoft Visual Studio Community 2019,/culture:en-US,/noep,C:\Users\Ruturaaj\AppData\Local\Temp\VSIX50es31ad.vsix
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:08 - Microsoft VSIX Installer
07-10-2020 16:14:08 - -------------------------------------------
07-10-2020 16:14:09 - Initializing Install...
07-10-2020 16:14:10 - Extension Details...
07-10-2020 16:14:10 - Identifier : 4c82e17d-927e-42d2-8460-b473ac7df316
07-10-2020 16:14:10 - Name : CodeMaid
07-10-2020 16:14:10 - Author : Steve Cadwallader
07-10-2020 16:14:10 - Version : 11.1.209
07-10-2020 16:14:10 - Description : CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
07-10-2020 16:14:10 - Locale : en-US
07-10-2020 16:14:10 - MoreInfoURL : http://www.codemaid.net/
07-10-2020 16:14:10 - InstalledByMSI : False
07-10-2020 16:14:10 - SupportedFrameworkVersionRange : [4.7.2,)
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - SignatureState : Unsigned
07-10-2020 16:14:10 - Supported Products :
07-10-2020 16:14:10 - Microsoft.VisualStudio.Community
07-10-2020 16:14:10 - Version : [15.0,17.0)
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - References :
07-10-2020 16:14:10 - Prerequisites :
07-10-2020 16:14:10 - -------------------------------------------------------
07-10-2020 16:14:10 - Identifier : Microsoft.VisualStudio.Component.CoreEditor
07-10-2020 16:14:10 - Name : Visual Studio core editor
07-10-2020 16:14:10 - Version : [15.0,)
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - Signature Details...
07-10-2020 16:14:10 - Extension is not signed.
07-10-2020 16:14:10 -
07-10-2020 16:14:10 - System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at VSIXInstaller.LocationBasedSKU..ctor(String appidInstallPath, String appidName, Version vsVersion, String edition, String rootSuffix)
at VSIXInstaller.LocationBasedSKU..ctor(String appidInstallPath, String appidName, Version vsVersion, String edition, String rootSuffix, IntPtr alternateUserToken)
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.ComputeInstallableExtensions(IStateData stateData, Boolean isRepairSupported, Boolean isExtensionPack, IDictionary`2 skuDataMapping, IList`1 installableExtensionsPaths)
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 时,您可以在您的 PC 上对 VS 进行深度清理,然后重新安装它。
卸载时请输入C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe
至运行程序。它将卸载所有 VS2017 和 VS2019 版本以及整个数据。
如果卸载VS2019还不行,可以试试这个
此外,
删除 C:\Users\xxx(当前用户)下的 16.0_xxxx
等文件夹\AppData\Local\Microsoft\VisualStudio`。
完成后,确保没有你当前VS2019版本的文件夹(community*professional**企业*) C:\Program Files (x86)\Microsoft Visual Studio19
.
====================================
然后, right-click on the vs_installer
-->点击运行 as administrator然后像这样安装相关的扩展开发工作负载:
最后,安装完成后,请再次测试。