Closed Merlin04 closed 4 years ago
Can you push your code to github so I can examine it? https://github.com/Merlin04/RazorEngineCore
This is happening even when I make a new clone of the repository, so it isn't related to my changes.
It’s hard to tell without seeing a code :)
If you want to precompile templates during the build process (not runtime) and embed then as resources have a look at my repository.
https://www.nuget.org/packages/RazorEngineCore.Precompiler/
https://github.com/wdcossey/RazorEngineCore.Extensions
There's a project called RazorEngineCore.Precompiler that will do this, you can use it as a starting point.
The code I'm trying to run the tests for is this repository, not my modifications.
I run:
git clone https://github.com/adoconnection/RazorEngineCore
Then open the solution in Rider, and try running the tests, but it fails.
The tests run successfully with dotnet test
, so this must be an issue with Rider.
Just found an update that fixes the Rider issue (EAP9)
I'm working on a PR that will add support for compiling multiple templates in one assembly, but I can't get any of the unit tests that involve running a template to run successfully. I get an exception like this:
It seems like the issue is with line 18 of RazorEngineCompiledTemplate.cs:
The call to
GetType
doesn't throw an exception, but it returns null. If I use the debugger to look at theDefinedTypes
property ofassembly
, I get this exception:Any idea why I'm getting this error?