visual-studiovisual-studio-extensions

HTML for JavaScript Visual Studio Extension fails to install in Visual Studio 2022


When installing the HTML for JavaScript Visual Studio extension for Visual Studio 2022 it fails with the following error: This extension cannot be installed because the following references are missing: Microsoft.VisualStudio.Component.CoreEditor


Solution

  • This error can be resolved with a little effort:

    1. Open the VSIX installer with a zip program.
    2. Modify the catalog.json file inside the VSIX folder and find the entry for Microsoft.VisualStudio.Component.CoreEditor and update it to be "Microsoft.VisualStudio.Component.CoreEditor":"[17.0,18.0)
    3. Modify the extension.vsixmanifest file inside the VSIX folder and update the file with the changes below:

    Lines 12 through 18 updates to:

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

    Line 22 updates to:

    <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,18.0)" DisplayName="Visual Studio core editor" />
    
    1. Run the VSIX with all Visual Studio instances closed and enjoy your plugin!

    Successfully installed HTML for JavaScript Extension for Visual Studio 2022