Describe the bug
When trying to use RazorLight with System.Runtime.Experimental (v6.0.2) it errors with the 'is defined in an assembly that is not referenced' exception.
To Reproduce
Create a blank Console Application, add System.Runtime.Experimental and RazorLight NuGet packages.
Then add the following code to the Program.cs:
using RazorLight;
var engine = new RazorLightEngineBuilder()
.AddDynamicTemplates(new Dictionary<string, string>
{
{ "Test", "Hello @Model.Test, welcome to RazorLight!" }
})
.UseMemoryCachingProvider()
.Build();
var model = new { Test = "Blah" };
var result = await engine.CompileRenderAsync("Test", model);
It works if you just uninstall the System.Runtime.Experimental NuGet package, but not when it is installed.
Expected behavior
I can understand if this doesn't work, but it would be nice if it does. I'm not sure what the System.Runtime.Experimental NuGet does under the covers so it might make it hard to work around.
If it isn't possible for this to work though, potentially a warning/information in the readme to say it's not supported would be nice, it took a while to backtrack to find this was the cause.
Apologies if there's already information about this, I couldn't find anything through google or a quick look through the issues.
Information (please complete the following information):
OS: Windows 10
Platform .Net 6.0
RazorLight version 2.3.0
Are you using the OFFICIAL RazorLight package? Yes
Visual Studio version Visual Studio Community 17.3.6
Describe the bug When trying to use RazorLight with System.Runtime.Experimental (v6.0.2) it errors with the 'is defined in an assembly that is not referenced' exception.
To Reproduce Create a blank Console Application, add System.Runtime.Experimental and RazorLight NuGet packages. Then add the following code to the Program.cs:
It works if you just uninstall the System.Runtime.Experimental NuGet package, but not when it is installed.
Expected behavior I can understand if this doesn't work, but it would be nice if it does. I'm not sure what the System.Runtime.Experimental NuGet does under the covers so it might make it hard to work around.
If it isn't possible for this to work though, potentially a warning/information in the readme to say it's not supported would be nice, it took a while to backtrack to find this was the cause.
Apologies if there's already information about this, I couldn't find anything through google or a quick look through the issues.
Information (please complete the following information):