Is it possible to edit the .cshtml files after publish or are there any draw backs?
Asked
Active
Viewed 4,013 times
1 Answers
6
Yes, you can edit the .cshtml file after you publish it.
Yes, there are drawbacks.
- If you edit on the production server, you are bypassing QA
- You are not going through a proper build cycle
- You must integrate this change into version control
I strongly recommend adhering to a cycle
- Code
- Unit test
- Check in
- Publish / Deploy to QA
- Test in QA
- Go back to "Code" as needed
- Publish / Deploy to PROD
- If something breaks, go back to "Code"
Use a version control system that supports branching and tagging to make that cycle much easier.
Even if "QA" is a VM on your development server and you put on the "QA" hat, I would not skip that step.

Eric J.
- 147,927
- 63
- 340
- 553
-
But not if you [compile before runtime](http://stackoverflow.com/questions/13482007/how-to-compile-cshtml-before-runtime), correct? – ruffin Aug 05 '14 at 18:16
-
2Drawbacks aside, how would you do this? – Jacob M. Jan 25 '20 at 16:49