Hi all, this seems really basic, and perhaps I'm missing something, though I must have read Mr Ebbo's blog tens times now!
What I want is to deploy my razors views compiled (duh!) but without the actual razor view included. I want to do this so others can't modify the razor code at a later time or see just what I've done with them.
So I created an MVC4 web app, installed the extension, installed the razorgenerator.mvc nuget package, and for Index.cshtml:
- Set Build Action property to None
- Set Copy To Output Directory property to Do Not Copy
- Set Custom Tool property to RazorGenerator
Immediately it creates the Index.generated.cs, as it should. Cool. So I run this in debug mode and it works just fine, showing the mvc template home page. Now when I publish this and put it onto my local IIS, I get the familiar:
"The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:..."
If I set the Build Action to Content it works just fine, but deploys Index.cshtml, which I don't want.
What have I missed here?