This project is read-only.

Can I Enable and Redo RazorGenerator as a pre-build step?

Dec 5, 2012 at 4:26 AM

This may have a cost of increasing build time, at the same time, at least "Enable" feature can be very handy in case people miss the setting, etc.


Also, would it be possible to run these commands from a batch/Powershell file outside VS Nuget command prompt? Of course assuming we pass the specifics of the project.


Thanks a lot.

Dec 5, 2012 at 5:09 PM

This is already something like that. See Using RazorGenerator.MsBuild.

Dec 5, 2012 at 10:14 PM
Edited Dec 5, 2012 at 10:15 PM

Thanks a lot David, and sorry for missing that.

Another question if you may, if I use the MSBuild version, and do xcopy deployment of the web application project (or run locally) without deleting view files (.cshtml), these file will take priority over the compiled classes, right? (and, in essence, will be compiled again by IIS?)

Dec 5, 2012 at 10:38 PM

That depends on settings. Look for UsePhysicalViewsIfNewer in in your App_Start\RazorGeneratorMvcStart.cs and it'll make sense :)