I need to modify source files while debugging my ASP.NET MVC app. I know about Edit and Continue, but it doesn’t really suit me.
Basically all I need is for Visual Studio to stop making controller files “read-only”. There is a similar question on SO about this problem, but the solution (unchecking “edit and continue” in Options) doesn’t unlock controller files, although it unlocks all others.
I solved this problem. Anytime someone else needs to do this I just share my exported Visual Studio settings with them.
A double check of my setup shows that we have Edit and Continue unchecked in 2 places:
However there may be other settings that make it work.
We definitely do have the ability to edit any C# file (including controllers) while the debugger is attached. However, getting those changes back into the debugger requires a CTRL + SHIFT + F5.