Issues with .NET Standard reference on Linux starting with 2020.9.1
See original GitHub issueAfter updating to version 2020.9.1
, I get the following exception when rendering templates:
RazorEngineCore.RazorEngineCompilationException: Unable to compile template: (28,29): error CS0012: The type ‘Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. at RazorEngineCore.RazorEngine.CreateAndCompileToStream(String templateSource, RazorEngineCompilationOptions options) at RazorEngineCore.RazorEngine.Compile[T](String content, Action`1 builderAction)
This happens on Linux only (see this build), the same logic works on Windows as expected (with identical SDK versions etc.).
Do you have an idea how to overcome this issue? I tried to tweak the assembly references, but I suspect the compilation process of the template is missing some .NET Standard reference.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Build with 2020.10.1 works on Windows and Linux. Thank you very much!
Hi, thats probably due to I missed something with references on init. Will recheck it again.