Preview image of visual studio 2022 extension not showing in Extension Manager

200 views Asked by At

I'm developing a visual studio 2022 extension. All is working as expected (the vsix is generated and it installs and the icon is shown) except that the Preview Image is not shown in Extensions Manager. The Icon of the extension is showing fine but the Preview Image is not.

This is shown in extensions manager

In the file source.extension.vsixmanifest i have the corresponding tag PreviewImage and the image exists in the Resources directory as well as the Icon image. Both have Content as compilation action and copy to ouput directory of both images is set to Allways:

<?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>
        ...
        <Icon>Resources\ExtractCommandIcon.png</Icon>
        <PreviewImage>Resources\Preview.png</PreviewImage>
    </Metadata>
    ...
</PackageManifest>

The image has 200x200 pixels as stated in the documentation VSIX schema

I have tried to change the compilation action of the PreviewImage from Content to Resource and EmbeddedResource without success.

3

There are 3 answers

0
Bowman Zhu-MSFT On

This should be a issue of VS2022, I tested this on my side and also encounter this issue.

You can report this issue to Microsoft Office via this link:

https://developercommunity.visualstudio.com/VisualStudio/report

0
user487779 On

I have checked the source code and neither of the two UIs ( one is behind a feature flag ) use the preview image.

https://developercommunity.visualstudio.com/t/VSIX-Preview-Image-not-used-by-visual-st/10610668?viewtype=all

1
Peter Gibbons On

It's not a bug. It's a feature. A feature in development anyways. At the moment MS's documentation is not really clear about where the 'Icon' and 'PreviewImage' elements send their referenced icons. The answer is both go to the Extension Manager window. Using VS Pro v17.9.2 and VS Pro v17.10.0 - Preview it's the 'Icon' reference that appears in the Extension Manager ListView. VS Pro v17.10.0 - Preview (and looks like VS Code as well) have a new and improved Extension Manager UI featuring a 'Details' section. That's where the 'PreviewImage' icon (200x200) goes. A glance at the new Extension Manager UI and it all makes sense. Looks like MS's documentation releases have been outpacing their deployment schedule. :)