Rider Plugin `ActionAttribute` deprecated and missing action icon
I am having an issue trying to get a Rider backend Action to display an icon like it use to with just the `plugin.xml` populated the same way for front end actions.
I've tried using the `ActionAttribute` and `Icon` property pointing to a Type inheriting from `CompiledIconCsClass` but `TiImageSerializerSvg.Parse` seems very particular about the SVG files.
Is there another attribute that should be used or easier way to be able to load SVGs to resolve this issue? I see the rider plugin example for [Action still uses the deprecated attribute](https://github.com/JetBrains/resharper-rider-plugin/blob/master/samples/Actions/src/dotnet/ReSharperPlugin.Actions/SampleAction.cs#L4-L21).
The action invocation works to be clear, its just the icon I am still suck how to update correctly with a normal SVG or PNG.
Any help would be appreciated.
请先登录再写评论。
The current recommendation is to declare the icon in the `plugin.xml` in the frontend part of the plugin, as documented in the IntelliiJ Platform — this allows the frontend to instantiate an action without calling its constructor (for certain purposes), and thus works faster and is more reliable.
Note that the example you are referring to does this on the frontend as well.
> `TiImageSerializerSvg.Parse` seems very particular about the SVG files
These limitations are for the icons to be properly rendered in R# since its SVG renderer is very limited. If your icon will only ever appear in Rider, which provides a totally different and much more complete SVG renderer, these limitations are mostly irrelevant.