I have cshtml files in a c# web forms project that I want to publish using a publish profile that has the options:
- Allow precompiled site to be updateable = false
I am using Postal outside of ASP.net http://aboutcode.net/postal/outside-aspnet.html as the emails that are being sent are from a background process. This is using hangfire and is very similar to this: http://docs.hangfire.io/en/latest/tutorials/send-email.html
The problem is that the cshtml file is being precompiled when I dont want it to be and the resulting content of the file is:
This is a marker file generated by the precompilation tool, and should not be deleted!
I need the full contents of the original cshtml file and don't want the marker contents but I do also want to retain the setting of Allow precompiled site to be updateable = false
so all other files can not be updated.
The only way I can see to do this is to have Allow precompiled site to be updateable = true
In short I want to deploy the cshtml in the same way that images files are when their build action is set to content.
Any ideas?
Edit: Seems that someone else has the exact same problem: