toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.52k stars 259 forks source link

CompileRenderStringAsync have inconsistent problem with the model. #509

Open 0nary opened 1 year ago

0nary commented 1 year ago

Describe the bug When I run tests in a github workflow using CompileRenderStringAsync , I get this error in 2.3.0 : RazorLight.Compilation.TemplateCompilationException : Failed to compile generated Razor template: Or this one in 2.0.0-rc.3 : System.NullReferenceException : Object reference not set to an instance of an object.

To Reproduce You can find it in my repos : https://github.com/0nary/RazorLightTemplateRendererTesty

Expected behavior I expected the method CompileRenderStringAsync to work consitently.

Additional context The same tests work fine when I run it on my visual studio.

jzabroski commented 1 year ago

I still owe you a response.