Visual Studio 2019(社区版) - 无法安装/更新扩展 [英] Visual Studio 2019 (Community Edition) - Cannot install/update Extensions

查看:63
本文介绍了Visual Studio 2019(社区版) - 无法安装/更新扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在英特尔 i3 笔记本电脑上全新安装的 Windows 10(64 位)上全新安装的 Visual Studio 2019 社区版.

It's a fresh installation of Visual Studio 2019 Community Edition on my fresh installation of Windows 10 (64 bit) on Intel i3 laptop.

每当我尝试安装扩展程序(例如 CodeMaid)时,我都会收到未找到 COM ClassID 错误.我不确定为什么会出现此错误.从谷歌搜索和参考一些文章后,我认为这个错误是由于 64 位机器上的 32 位 COM.Visual Studio 尝试在 64 位注册表下查找 COM CLASSID,但它失败了,因为它可能在 32 位注册表下.这只是一个疯狂的猜测.

Whenever I attempt to install an extension (for example, CodeMaid), I get COM ClassID not found error. I'm not sure why is this error. From google search and after referring to some articles, I think this error is due to 32bit COM on 64bit machine. Visual Studio attempts to look for the COM CLASSID under 64bit registry, but it fails since it might be under 32bit registry. This is just a wild guess.

补充一点,报告问题";在帮助"下也不适用于我,但 NuGet 包管理器运行良好;我可以下载和引用 NuGet 包.不确定这是否与扩展相关,但只是为您发布此信息.

Just to add to it, "Report a Problem" under "Help" is also not working for me, but NuGet Package Manager is working well; I could download and reference NuGet packages. Not sure if this is anywhere related to the Extensions, but just keeping this information posted for you.

请帮我解决这个错误.

我正在复制我尝试安装 CodeMaid 扩展时遇到的错误的完整错误日志.这肯定不是特定于扩展程序的错误,因为当我尝试更新Live Share"等扩展程序时,我遇到了同样的错误.

I'm copying the complete error log of error I got when I attempted to install CodeMaid extension. This is surely not a extension-specific error because I get the same error when I attempt to Update extensions like "Live Share".

查看以下错误日志以了解详细信息:

Take a look at following error log for details:

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 Studio\2019\Community\Common7\IDE\vsixinstaller.exe,/appidinstallpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\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 进行深度清理,然后重新安装它.

Actually, when you uninstall VS, you could do a deep clean about VS on your PC and then reinstall it.

卸载时请输入C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe运行程序.并且会卸载所有VS2017和VS2019版本的数据.

When you uninstall it, please enter C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe to run the program. And it will uninstall all VS2017 and VS2019 version with the whole data.

如果卸载 VS2019 无效,您可以试试这个.

If uninstalling VS2019 did not work, you can try this.

此外

删除C:\Users\xxx(current user)\AppData\Local\Microsoft\VisualStudio`下的16.0_xxxx等文件夹.

delete folders like 16.0_xxxx under C:\Users\xxx(current user)\AppData\Local\Microsoft\VisualStudio`.

完成后,请确保没有您当前 VS2019 版本的文件夹(社区*专业**企业*)C:\Program Files (x86)\Microsoft Visual Studio\2019 下.

When you finish it, make sure that there is no folder of your current VS2019 version(community*professional**enterprise*) under C:\Program Files (x86)\Microsoft Visual Studio\2019.

====================================

====================================

然后,右键点击vs_installer-->点击以管理员身份运行,然后像这样安装相关的扩展开发工作负载:

Then, right-click on the vs_installer-->click run as administrator and then install the related extension development workload like this:

最后,安装完成后,请再次测试.

Last, when you finish the installation, please test it again.

这篇关于Visual Studio 2019(社区版) - 无法安装/更新扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆