Error VSSDK1311 about ProductArchitecture when building extension for VS2022

1.7k views Asked by At

I'm building a VSIX project and seeing this error message:

VSSDK1311 The vsixmanifest must contain a value for 'PackageManifest:Installation:InstallTarget:ProductArchitecture'.

What do I need to do to fix this?

2

There are 2 answers

2
Drew Noakes On

Since VS2022 is 64-bit, you must specify the architecture of the target you support.

Where you previously may have written:

  <Installation>
    <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[16.0,17.0)" />
  </Installation>

You would now write:

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

If your VSIX is configured to target VS2022 as well as earlier versions you may specify that with something resembling:

  <Installation>
    <InstallationTarget Version="[16.0,18.0)" Id="Microsoft.VisualStudio.Pro">
      <ProductArchitecture>x86</ProductArchitecture>
    </InstallationTarget>
    <InstallationTarget Version="[17.0,18.0)" Id="Microsoft.VisualStudio.Pro">
      <ProductArchitecture>amd64</ProductArchitecture>
    </InstallationTarget>
  </Installation>
1
Dino Thunder On

I tried your way and got a few errors. I found a way to fix it. Because 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 https://www.nuget.org/packages/Microsoft.VSSDK.BuildTools/17.0.3177-preview3