1

I have a visual studio extension for VS2019. I made some minute changes so that extension can be installed on vs2022. I was managed to compile and build the code in V2022.If I try to install the extension in 2022 (using .vsix file), I am getting a warning "The extension is not installable on any currently installed products".

I attached the log file. Any suggestions please ?

1/10/2022 1:30:16 PM - Microsoft VSIX Installer
1/10/2022 1:30:16 PM - -------------------------------------------
1/10/2022 1:30:16 PM - vsixinstaller.exe version:
1/10/2022 1:30:16 PM - 17.0.5226-preview5
1/10/2022 1:30:16 PM - -------------------------------------------
1/10/2022 1:30:16 PM - Command line parameters:
1/10/2022 1:30:16 PM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,D:\Test\Vs2022Test\bin\Release\Vs2022Test.vsix
1/10/2022 1:30:16 PM - -------------------------------------------
1/10/2022 1:30:16 PM - Microsoft VSIX Installer
1/10/2022 1:30:16 PM - -------------------------------------------
1/10/2022 1:30:16 PM - Initializing Install...
1/10/2022 1:30:16 PM - Extension Details...
1/10/2022 1:30:16 PM -  Identifier         : Vs2022Test
1/10/2022 1:30:16 PM -  Name               : TTest extension
1/10/2022 1:30:16 PM -  Author             : Author
1/10/2022 1:30:16 PM -  Version            : 1.0.0.0
1/10/2022 1:30:16 PM -  Description        : For VS2022.
1/10/2022 1:30:16 PM -  Locale             : en-US
1/10/2022 1:30:16 PM -  MoreInfoURL        : 
1/10/2022 1:30:16 PM -  InstalledByMSI     : False
1/10/2022 1:30:16 PM -  SupportedFrameworkVersionRange : [4.7,)
1/10/2022 1:30:16 PM - 
1/10/2022 1:30:16 PM -  SignatureState     : Unsigned
1/10/2022 1:30:16 PM -  Supported Products : 
1/10/2022 1:30:16 PM -      Microsoft.VisualStudio.Community
1/10/2022 1:30:16 PM -          Version : [15.0,18.0)
1/10/2022 1:30:16 PM -          ProductArchitecture : notSpecified
1/10/2022 1:30:16 PM -      Microsoft.VisualStudio.Pro
1/10/2022 1:30:16 PM -          Version : [15.0,18.0)
1/10/2022 1:30:16 PM -          ProductArchitecture : notSpecified
1/10/2022 1:30:16 PM -      Microsoft.VisualStudio.Enterprise
1/10/2022 1:30:16 PM -          Version : [15.0,18.0)
1/10/2022 1:30:16 PM -          ProductArchitecture : notSpecified
1/10/2022 1:30:16 PM - 
1/10/2022 1:30:16 PM -  References         : 
1/10/2022 1:30:16 PM -  Prerequisites      : 
1/10/2022 1:30:16 PM -      -------------------------------------------------------
1/10/2022 1:30:16 PM -      Identifier   : Microsoft.VisualStudio.Component.CoreEditor
1/10/2022 1:30:16 PM -      Name         : Visual Studio core editor
1/10/2022 1:30:16 PM -      Version      : [15.0.25904.2,)
1/10/2022 1:30:16 PM - 
1/10/2022 1:30:16 PM - Signature Details...
1/10/2022 1:30:16 PM -  Extension is not signed.
1/10/2022 1:30:16 PM - 
1/10/2022 1:30:16 PM - Searching for applicable products...
1/10/2022 1:30:16 PM - Found installed product - Global Location
1/10/2022 1:30:16 PM - Found installed product - Visual Studio Professional 2022
1/10/2022 1:30:16 PM - Found installed product - Visual Studio Professional 2019
1/10/2022 1:30:16 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   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.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
   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)


StraightFlush
  • 21
  • 1
  • 2
  • https://stackoverflow.com/questions/67769432/error-vssdk1311-about-productarchitecture-when-building-extension-for-vs2022 – Hans Passant Jan 10 '22 at 14:40

1 Answers1

3

It looks like you haven't specified the product architectures correctly. VS2022 is 64-bit, target architecture amd64, and earlier versions are 32-bit, target architecture x86. You need to specify that in the vsixmanifest as described in the docs. In Visual Studio rightclick the manifest in Solution Explorer and do View Code, then overwrite the Installation element with what's below (this is just what the docs say on the link above). It'll show two lines in the manifest designer if you've done it right:

<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>

This assumes you are just trying to upgrade a template with no code. If you have code it's much, much more complicated than that, which is part of the reason there are so few extensions for VS2022 at the moment. It is all described on those documentation pages though.

Rich N
  • 8,939
  • 3
  • 26
  • 33
  • 1
    if I add `amd64` tag inside ``, XML validation error is happening. 'The 'http://schemas.microsoft.com/developer/vsx-schema/2011:InstallationTarget' element is not declared.' – StraightFlush Jan 10 '22 at 14:44
  • You need to do this in VS2022... If you rightclick the .sln file in File Explorer and do Open With... it'll let you choose Visual Studio 2022, and it should open OK. – Rich N Jan 10 '22 at 14:58
  • 1
    The issue and the solution is mentioned in this link - https://developercommunity.visualstudio.com/t/schema-validation-error-after-using-vsix-manifest/1521924 – StraightFlush Jan 10 '22 at 15:24
  • OK, but does the solution above work for you if you use VS2022? – Rich N Jan 10 '22 at 16:32
  • I have a new issue :(. I posted it here [link](https://stackoverflow.com/questions/70655835/modification-of-vs2017-extension-to-run-in-vs2022) – StraightFlush Jan 10 '22 at 16:37