I am precompiling my razor views in my VS publish profile by setting the following properties:
- Precompile options: deselect "Allow precompile site to be updatable", deselect "Emit debug information"
- Merge options: select "Merge all outputs to a single assembly", give name "AppCode", check "Treat as library component (remove the AppCode.compiled file).
In order to test whether my application was actually reading from the compiled views, I renamed one of my cshtml files, and tested locally. All good, the view still loaded fine indicating that the compiled view was being called.
However, when I deployed all the binaries to the server and did the same test by renaming a cshtml file, the browser responsed with server 500 error.
What am I missing please?