2
Vote

Needs better error reporting when there are compilation errors

description

When you call CodeDomProvider.CompileAssemblyFromDom it can report compilation errors that are turned into an exception. The problem is that I cannot see the code that it couldn't compile.
 
Please include a call to CodeDomProvider.GenerateCodeFromCompileUnit and pass that information along with the compilation errors to the TemplateCompilationException.

comments

AntarisZX wrote Nov 22, 2011 at 1:00 PM

This is addressed in v3, we now include a much more verbose compilation output. This is currently enabled by setting Debug mode to on when using RazorEngine. Please visit https://github.com/Antaris/RazorEngine for updates, we're no longer pushing code changes here.