Not pre-compiling within Orchard CMS

Jun 17, 2013 at 6:02 AM
Hello, I'm trying to glue a few pieces together here, namely an Orchard CMS module with David Ebbo's excellent usage of Razor Generator:

In Orchard each custom module resides in its own 'area'. In my module I want to precompile a razor view when I run msbuild via a batch file:

if "%~1"=="" build Build
msbuild /t:%~1 Orchard.proj

One of the requirements for Orchard is that Build Action is always set to content (otherwise the build fails). That's fine though because it just means the razor view is bundled in but ignored (in theory). The result however is that I get this:


The .cs code appear to be just what it should be, it is just not building into the .dll as I'd hoped. Any clues on how to do this? Thanks in advance.