I use Hangfire and Postal to send emails asynchronously from the page loop (in the MVC 5 application). The thread that creates the email uses the RazorEngine project .
The visual studio 2013 project (express) is configured to "Precompile at publication time" with "Allow pre-assembly of the site for updating" set to false. This has significant advantages since I use a shared web host and cannot change the reuse time of the application pool (which is 20 minutes). The site responds to requests much faster if the site does not hit within 20 minutes.
However, the published site has a “automatically generated marker” .cshtml files for email templates (even if copying to the output directory is always set for copying), and the stream (non-MVC) will only generate emails if I copy the Views / Email folder from the visual studio project to the published folder manually after each publication.
Is there a way to exclude specific .cshtm files or an entire folder from the "precompile" option so that .cshtml files can be used outside of MVC. Thank.
source
share