I have an EPiServer plugin that links to style resources like this
<link rel="stylesheet" type="text/css" href="/episerver/Shell/8.5.1.0/ClientResources/epi/themes/legacy/ShellCore.css">
<link rel="stylesheet" type="text/css" href="/episerver/Shell/8.5.1.0/ClientResources/epi/themes/legacy/ShellCoreLightTheme.css">
Now to get the correct version of the resources I need to get the correct EPiServer.Shell.UI assembly version. (The 8.5.1.0 part of the url). At the moment I'm doing that with reflectiion of the EPiServer.Shell.UI assembly and retrieving the version from there.
I've googled to find a cleaner way of doing this but the only blog post about retrieving EPiServer shell styles was for WebForms in EPiServer version 6. I've also read this article about Client resources but I unsure if it even has anything to do with plugins.
Some help and tips from someone who has knowledge of these plugins are most welcome!
(So to make the question clear; what is the correct way to render links to EPiServer Shell stylesheets from a plugin?)