Reputation: 21
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)
Upvotes: 1
Views: 5390
Reputation: 1934
Just adding some useful information for the chosen answer:
ProductArchitecture is a new metadata that was introduced in VS2022. Using 16.x versions of the build tools will not recognize it. You should be using the latest 17.x version of the build tools (currently marked pre-release): https://www.nuget.org/packages/Microsoft.VSSDK.BuildTools/17.0.3177-preview3
Upgrade the nuget package Microsoft.VSSDK.BuildTools
Upvotes: 0
Reputation: 9475
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.
Upvotes: 3