```
SetSite failed for package [BuildXLVsPackage]Source: 'BuildXLVsPackageDev17' Description: Unable to cast object of type 'Microsoft.VisualStudio.CommonIDE.Solutions.CSlnUpdate' to type 'Microsoft.Internal.VisualStudio.Shell.Interop.IVsSolutionBuildManagerPrivate'. System.InvalidCastException: Unable to cast object of type 'Microsoft.VisualStudio.CommonIDE.Solutions.CSlnUpdate' to type 'Microsoft.Internal.VisualStudio.Shell.Interop.IVsSolutionBuildManagerPrivate'. at BuildXL.VsPackage.VsProject.ProjectFlavorFactory..ctor(BuildXLVsPackage package) in \.\Public\Src\IDE\VsIntegration\BuildXLVsPackageShared\VsProject\ProjectFlavorFactory.cs:line 59 at BuildXL.VsPackage.BuildXLVsPackage.<InitializeAsync>d__15.MoveNext() in \.\Public\Src\IDE\VsIntegration\BuildXLVsPackageShared\BuildXLVsPackage.cs:line 137
```
The problem is that the extension has its own definition of Microsoft.Internal.VisualStudio.Shell.Interop.IVsSolutionBuildManagerPrivate copied from Microsoft.Internal.VisualStudio.Shell.Interop.10.0.DesignTime.dll. The solution is to use the interface defined in Microsoft.Internal.VisualStudio.Interop.dll.
- Dev17 extensions must be build separately from older versions, as the 32 bit versions are not compatible with the amd64 process used for vs2022,
- Pull managed code into a separate shared directory.
- Update VS SDK package versions to preview versions for dev17.
- Create a second dev17 extension (which is a copy of the older extension with references to newer versions of the VS SDK). This extension will only install on dev17, and has a target architecture of amd64.
- Compile the shared code using the newer and older versions of the SDK for each extension.
- Update extension version to 3.1
- Tested on BuildXL and OSGTools generated solutions with vs2019 and vs2022.
Related work items: #1869107, #1870020
Expose the analyzers support from the Bxl sdk.
Bxl supported Roslyn analyzers for a long time, but the list of supported analyzers was built in into Bxl Sdk.
This PR exposes `analyzers` properties and every project may add extra analyzers if needed:
```
@@public
export const dll = BuildXLSdk.library({
assemblyName: "BuildXL.Cache.ContentStore.Distributed",
sources: globR(d`.`,"*.cs"),
analyzers: [importFrom("protobuf-net.BuildTools").pkg]});
```