Missing Microsoft.VisualStudio.Component.CoreEditor when installing Visual Studio extension
Asked Answered
S

4

24

I am trying to get scrcpy to run in Visual Studio by using this extension and determine if I can extend its features.

Unable to install a VSIX extension for Visual Studio 2019

Installation fails indicating:

enter image description here

I updated the <InstallationTarget> and <Dependency> as per here,

You need to change InstallationTarget to [15.0,17.0) and Prerequisite to [15.8.27729.1,).

I unzipped the .vsix file, updated the extension.vsixmanifest file to the following:

<Installation>
    <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,17.0)" />
  </Installation>
  <Dependencies>
    <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" Version="[4.5,)" />
    <Dependency Id="Microsoft.VisualStudio.MPF.15.0" DisplayName="Visual Studio MPF 15.0" Version="[15.0]" />
  </Dependencies>
  <Prerequisites>
    <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.8.27729.1,)" DisplayName="Visual Studio core editor" />
  </Prerequisites>

Zipped the directory, renamed to *.vsix, tried to install again.

The installer now recognizes Visual Studio 2019, begins installing but fails, missing Microsoft.VisualStudio.Component.CoreEditor.

12/11/2019 5:25:00 PM - Beginning to install extension to Visual Studio Enterprise 2019 (2)...
12/11/2019 5:25:02 PM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingReferencesException: This extension cannot be installed because the following references are missing:
-Microsoft.VisualStudio.Component.CoreEditor (Microsoft.VisualStudio.Component.CoreEditor)
   at Microsoft.VisualStudio.ExtensionManager.EngineUtilities.EnsureNoMissingReferences(IEnumerable`1 missingRefs)
   at Microsoft.VisualStudio.ExtensionManager.PackageInstaller.PrepareEngineInstall(IDependencyGraph dGraph, IDependencyComparisonSeed seed, Component vsixComponent, Boolean isProductComponent, Int32& totalInstallationSteps)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)

Suggestions on next steps please?

Saturated answered 11/12, 2019 at 22:29 Comment(2)
Prerequisite version for CoreEditor is usually set to [15.0,)Helpmeet
Apart from the changes of the extension.vsixmanifest file, please also change the "Microsoft.VisualStudio.Component.CoreEditor":"[15.0,16.0)" of the catalog.json file to [15.0,17.0). Let me know if it works:)Tsan
T
25

Missing Microsoft.VisualStudio.Component.CoreEditor when installing Visual Studio extension

l think the main issue is that you did not modify the version of Microsoft.VisualStudio.Component.CoreEditorto support Visual Studio 2019 in catalog.json file. So when you run the vsix file, it will monitor and then run the file is missing the corresponding VS2019 Microsoft.VisualStudio.Com ponent. CoreEditor.

Solution

Apart from the changes to extension.vsixmanifest file, please also change "Microsoft.VisualStudio.Component.CoreEditor":"[15.0,16.0)" in catalog.json file to [15.0,17.0).

Hope it could help you.

Tsan answered 12/12, 2019 at 10:43 Comment(2)
but where is catalog.json?Present
@Present It's inside the VSIX file. You can extract VSIX files using any tool that can open ZIP files like 7-zip.Strafe
P
13

Update for VS2022 to enable installation you have to modify extension.vsixmanifest

<Installation>
   <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,17.0)">
      <ProductArchitecture>x86</ProductArchitecture>
   </InstallationTarget>
   <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
      <ProductArchitecture>amd64</ProductArchitecture>
   </InstallationTarget>
</Installation>

As Perry Qian-MSFT said when using older vsix packages on newer Visual studio you should update [14.0,16.0] to whatever is the current VS version [14.0,xx.x].

Within files

  • catalog.json
  • manifest.json
  • extension.vsixmanifest
Pali answered 24/12, 2019 at 13:34 Comment(3)
Where are this files located on disk?Allethrin
@Allethrin you need to download the VSIX extension you want. Then unzip it to folder, change the files mentioned above. Save and zip the folder again with the ending *.vsix. Then you can insatll itFloats
It works fine in visual studio 2017 community, thanksHannahannah
S
8

As an alternative, you may want to modify the Visual Studio Installation (with Visual Studio Installer) and include the "Visual Studio extension development". Odds are, this toolset will fix the missing requirement issue. Visual Studio Installer Toolset

Stemson answered 31/3, 2020 at 0:22 Comment(1)
I have this installed and I still get the error mentioned in the OP.Debauchee
W
3

For VS2022 you need to edit the version string to [17.0,18.0) as in:

"Microsoft.VisualStudio.Component.CoreEditor": "[17.0,18.0)"

Weathersby answered 14/8, 2021 at 15:55 Comment(1)
I still can't install after this, I get the error "Microsoft.VisualStudio.ExtensionManager.MissingReferencesException: This extension cannot be installed because the following references are missing: -Microsoft.VisualStudio.Component.CoreEditor (Microsoft.VisualStudio.Component.CoreEditor)"Chardin

© 2022 - 2024 — McMap. All rights reserved.