Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSSDK/CPS/Extensibility: Image Loading in VS Extensions via .imagemanifest is Broken in VS2022 #373

Open
softworkz opened this issue Nov 26, 2023 · 1 comment

Comments

@softworkz
Copy link

Note

This is a copy of my report on developer community: https://developercommunity.visualstudio.com/t/VSSDKCPSExtensibility:-Image-Loading-i/10525678
Visibility of content from this site is somewhat limited and this repo is one of the core areas which is affected.

While starting to work on a custom VS Project-System, I had gone great lengths on trying to get custom images shown in the VS project tree.
The documentation and tooling (https://github.com/microsoft/VSProjectSystem) is outdated, haven’t seen much updates for years. Samples are still for VS 2015, the documentation wasn’t bad for the time when it was written, but now it’s unreliable in terms of what’s still valid and what not and too often, one can only speculate or research deeply like a forensic investigator.
The VSIX package with all the templates hasn’t been update either, not for 2017, not for 2019, not for 2022. I had to patch, recompile and re-pack to get it working with VS2022 #371.
While the Project System SDK seems to be still updated, all packages since VS 2017 are marked as “Preview”.

As I couldn’t get custom images working, I tried on different machines and eventually searched for other CPS-based project systems on GitHub. As it turned out: All of them are fighting with broken images in VS 2022.
I came across this report here: https://developercommunity.visualstudio.com/t/Extension-icons-missing-after-update/10242633

It was turned down as “Closed - Other Product” - which was incorrect. It has never been an issue with the extension’s code, it is Visual Studio 2022 which has broken images for all VS extensions (which are using imagemanifest files).

In that other report, you were stating that the Nano Framework VS extension would incorrectly specify the Resources values with the pattern

A: <String Name="Resources" Value="/$rootnamespace$;Component/" />

while the correct pattern would be:

B: <String Name="Resources" Value="/$rootnamespace$;v$assemblyversion$;$publickeytoken$;Component/" />

But upon further research, I have come to an entirely different picture:

Magically and interestingly, those (MS) extensions are not affected - their images are still shown, even with Pattern A. This means that there’s a mechanism to switch off the requirement for Pattern B very easily and it’s not a technical necessity.

Summary

  • You have broken custom images for a majority of all those Visual Studio Extensions, which are using imagemanifest files.
  • You have not documented Pattern A anywhere, nobody knows abbout it.
  • You haven’t updated your tooling for this.
  • The change came silently and unexpected - with a huge impact.
    .

Please remove the requirement for Pattern B. This is not to blame on developers - it’s a failure from MS product planning, causing developers turn around and give up on VS extension development, which would be sad. That’s also the reason why I’m filing this, even though I know now how to get around: the other 98% don’t.

@thedemons
Copy link

Any workarounds at the moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants