I am using Hangfire and Postal to send emails asyncronously from the page cycle (in an MVC 5 app). The thread which creates the email uses the RazorEngine project.
The visual studio 2013 (express) project is set to 'Pre-compile During Publish' with 'allow precompile site to be updatable' set to false. This has significant advantages, as I am using a shared web host, and have no ability to alter the app pool recycle time (which is 20 mins). The site responds to requests significantly faster if the site has not been hit for 20 mins.
However, the published site has "auto generated marker" .cshtml files for the email templates (even when copy to output directory is set to copy always), and the (non-MVC) thread will only generate the emails correctly if I copy the Views/Email folder from the visual studio project into the published folder manually after every publish.
Is there a way to exclude certain .cshtm files, or an entire folder, from the 'precompile' option so that the .cshtml files can be used outside MVC. Thank you.