I created a Roslyn Analyzer/Code Fix Vsix for Visual Studio 2022. If I run it locally, it installs into VS and works fine.
I tried to submit to Visual Studio Marketplace and got an error stating: Target 'Microsoft.VisualStudio.Community' with version range '[17.0,18.0)' requires specifying a product architecture
.
So in the .vsixmanifest file, I replaced:
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)" />
</Installation>
with
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
However, now, when I recompile I get Error VSSDK1062 Schema validation error for ... The 'http://schemas.microsoft.com/developer/vsx-schema/2011:Dependencies' element is not declared.
and same for Assets element. However, both elements are there in the file:
What am I missing?
.vsixmanifest:
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="AnalyzerFoo.67e73b27-47db-43ce-a4d0-b4a540217728" Version="1.0" Language="en-US" Publisher="Frank Rizzo"/>
<DisplayName>Foo Code Fix for Visual Basic</DisplayName>
<Description xml:space="preserve">Use Explicit Type code fix for Visual Basic (like in C#)</Description>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="AnalyzerUseExplicitType" Path="|AnalyzerUseExplicitType|"/>
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="AnalyzerUseExplicitType" Path="|AnalyzerUseExplicitType|"/>
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="AnalyzerUseExplicitType.CodeFixes" Path="|AnalyzerUseExplicitType.CodeFixes|"/>
<Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="AnalyzerUseExplicitType.CodeFixes" Path="|AnalyzerUseExplicitType.CodeFixes|"/>
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[17.0,18.0)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.LanguageServices" Version="[17.0,18.0)" DisplayName="Roslyn Language Services" />
</Prerequisites>
</PackageManifest>