Home > Forum > Plugins > [Closed] Did someone use Razor templates in a plugin

[Closed] Did someone use Razor templates in a plugin
0

MVP

Hi everyone,

did some try (and succeed) to use Razor within a plugin?
I tried to use RazorLight, which isn't possible because it is not strongly signed, which is a prerequisite for plugins.
Afterwards I tried the unmaintained RazorEngine, which fails, because the plugins assemblies are loaded dynamically and not from disk. Which in turn causes an error in RazorEngine which I'm currently trying to work around.

I will have a look at this tomorrow, but maybe someone else can either confirm that it works or doesn't. :)

If everything fails, I will deploy the assembly to the GAC also I would prefer not to resort to this.

Best regards,
Daniel

MVP

In the end I had to deploy the assemblies to GAC. I didn't like to deploy them manually so I've created a process for this. On the one hand it's an overkill on the other it was an interesting use case for the PowerShell action in addition to the logging (history) aspects.

In case someone is interested:
https://daniels-notes.de/posts/2021/deploying-assemblies
The attachment shows the deployment to two servers of the same environment.

Best regards,
Daniel