Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Update issues - A value for 'Component' needs to be specified in the catalog #1295

Closed
JohanPetersson opened this issue Nov 6, 2017 · 13 comments

Comments

@JohanPetersson
Copy link

I've been trying to update the extension for a couple of months now but run into the same issue. I thought it was temporary and would be fixed by next version, either next version of the extension or Visual Studio, but it hasn't been resolved. The error message says 'A value for 'Component' needs to be specified in the catalog.' Please see attached log VSIXInstaller.log

  • GitHub Extension for Visual Studio version: 2.3.1.30
  • Visual Studio version: 15.4.2
@grokys
Copy link
Contributor

grokys commented Nov 6, 2017

Hi @JohanPetersson, this was a known issue with VS but from what I understand it should have been fixed in 15.4. @Michael-Eng is this correct?

In the meantime, could you try the solution at #1206 (comment) and see if that works for you?

@JohanPetersson
Copy link
Author

JohanPetersson commented Nov 6, 2017

That solution didn't work. Got the same error message, more or less, when running the uninstall command.

2017-11-06 15:22:06 - Unable to find component in product catalog with this ID: Component.GitHub.VisualStudio,version=2.3.1.30
2017-11-06 15:22:06 - System.InvalidOperationException: A value for 'Component' needs to be specified in the catalog.
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineUnInstall(IInstalledExtension extension, Boolean downgrade)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.UninstallInternal(IInstalledExtension extension, Boolean forceDelete, Version targetedVSVersion, Boolean downgrade)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.Uninstall(IInstalledExtension extension, Version targetedVSVersion)
   at VSIXInstaller.InstallProgressPage.UninstallVsix(String vsixId, SupportedVSSKU targetSku, IProgress`1 progress)

Seems like toddhd had the same issue when trying to uninstall the extension.

@shana shana added the bug label Nov 7, 2017
@grokys
Copy link
Contributor

grokys commented Nov 7, 2017

Could you try this alternate (more complex) solution? #1206 (comment)

@tinaschrepfer
Copy link

@JohanPetersson, could you run http://aka.ms/vscollect and upload the logs somewhere for us to take a look? I suspect it's a known race condition issue when VS Install and VSIXInstaller are run around the same time, and VS Install is overwriting what VSIXInstaller did. But we would need the full logs to confirm.

@helmut-steiner
Copy link

Same issue on my machine.
I got Component.GitHub.VisualStudio,version=2.3.5.346 installed in my C:\ProgramData\Microsoft\VisualStudio\Packages folder but VS still shows 2.2.0.8 as my current version...

Accordingly when I try to deinstall or update it wants to remove a nonexisting extension. Install log:
20.11.2017 08:24:40 - Uninstalling 'GitHub Extension for Visual Studio', version 2.2.0.8.
20.11.2017 08:24:49 - Unable to find component in product catalog with this ID: Component.GitHub.VisualStudio,version=2.2.0.8

And that fails of course. Any ideas? Where is the version number stored?

@drguthals
Copy link
Contributor

@JohanPetersson and @helmut-steiner - did trying what @grokys suggested help?

Could you try this alternate (more complex) solution? #1206 (comment)

@helmut-steiner
Copy link

Finally fixed it. Doing all the steps in the suggested solution made the problem worse (i.e. I couldn't even start VS any more). So I tried just step 3 of the solution and voila it works again.
Step 3:
Delete the extension directory/directories that contain the GitHub extension. Since the GitHub extension installs to a random location, we need to find the folders
• In an elevated command prompt, go to c:\program files (x86)\Microsoft\VisualStudio[Community/Pro/Enterprise]\Common7\IDE\Extensions
• Run “dir /s GitHub” (note that there are asterisks before and after GitHub but they're not being displayed in this thread)
• Delete the directories that contain the GitHub files

@mgmoody42
Copy link

The solution in #1206 fixed my problem. Thx

@drguthals
Copy link
Contributor

Thank you both for letting us know. We will be working on a better solution to this, but it's good to know what works well in the meantime! :)

@JohanPetersson
Copy link
Author

I also tried the same solution as @helmut-steiner, i.e. just deleting the extension directories containing GitHub. I then got a warning when launching VS but I was able to re-install latest version of the extension now. Hopefully next update will work as well :)

@grokys
Copy link
Contributor

grokys commented Dec 5, 2017

Thanks for updating us @JohanPetersson, glad you solved the problem. I saw there were quite a few updates to the installer in VS15.5 that came out yesterday, hopefully this will become less of a problem.

@visuttaja
Copy link

visuttaja commented Mar 16, 2020

I had the same problem with update with community 2019. Version 16.4.6
Then I deleted all github extension subfolders (there was two) at:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\GitHub

Then I also deleted that GitHub leaf of that path.
Elevation was needed. Maybe my VC did not start as admin at first place!?
Original error was:
Embedded catalog does not contain a component.
Error went away and I was able to clean install Github extension thanks for your advices and cues.

@ilatypov
Copy link

One more step is required because the Visual Studio startup still tries to load the deleted DLL (and the reference to it does not come from 2022\Community),

devenv /UpdateConfiguration

https://stackoverflow.com/questions/36734419/my-vs-package-did-not-load-correctly

I ran the above from the Visual Studio's Native Tools Command Prompt started as Administrator.

This cured the message in ActivityLog.xml,

CreateInstance failed for package [VSPackage]Source: 'mscorlib' Description: Could not load file or assembly 'file:///C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\qxerk5to.w4e\FortifyPackage.dll' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\qxerk5to.w4e\FortifyPackage.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\qxerk5to.w4e\FortifyPackage.dll'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)
   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants