I’ve just published my first visual studio extension and having some problems with setting the Icon and license file to the source.extension.vsixmanifest file.
I’ve tried googling and getting help from AI tools such as ChatGPT and Claude.Ai but nothing I do seems to help.
I’ve created the project using the Code refactoring (.Net standard) template, which generates two projects – one for the code and one for the vsix, and manually changed just a few things in the vsixManifest file. Here’s the current file:
<?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="AutoEntityGenerator..3633938B-4D62-4E7A-92C3-BCBBD5DEEFE6"
Version="1.0.0"
Language="en-US"
Publisher="Zohar Peled"/>
<DisplayName>AutoEntityGenerator</DisplayName>
<Description xml:space="preserve">Automatically generates DTO and mapping classes based on your domain entities.</Description>
<Icon>AutoEntityCreator.png</Icon>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0,17.0)">
<ProductArchitecture>x86</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.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="AutoEntityGenerator" Path="|AutoEntityGenerator|"/>
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.LanguageServices" Version="[15.0,)" DisplayName="Roslyn Language Services" />
</Prerequisites>
</PackageManifest>
When I attempt to add the <License>
tag, I get the following warning:
The element ‘Metadata’ in namespace ‘http://schemas.microsoft.com/developer/vsx-schema/2011’ has invalid child element ‘License’ in namespace ‘http://schemas.microsoft.com/developer/vsx-schema/2011’. List of possible elements expected: ‘PreviewImage, Tags, Preview, Version’ in namespace ‘http://schemas.microsoft.com/developer/vsx-schema/2011’ as well as any element in namespace ‘##other’.
I’ve tried updating the Microsoft.VSSDK.BuildTools package (currently installed 17.10.2185, tried updating to the latest available version which is 17.11.414) but gut an error from nuget:
Unable to find package Microsoft.VisualStudio.SDK.Analyzers with version (>= 17.7.41)
- Found 28 version(s) in nuget.org [ Nearest version: 17.7.32 ]
As for the Icon – I’ve double checked, the icon file appears in the bin/release directory with the correct name, it’s a valid png file bot for some reason I can’t get it to show in the visual studio’s extensions menu’s installed tab.