In an ASP.NET Web Site project, I've always been able to make changes to the underlying C# code and simply refresh the page in the browser and my changes would be there instantly.
I can do the same thing when working with Java and Eclipse - edit my Java source and refresh the page and my changes are there.
I cannot do this in ASP.NET MVC though and it is a real downer - I have to stop the running process and make my changes, and then restart debugging. This is a huge waste of time.
Am I doing it wrong? What is the best approach to ASP.NET MVC development?
I rarely use debug mode in ASP.NET MVC project (F5). I run the project once with CTRL+F5 and always have a browser window open. Then if I make a change to a view (.aspx, .ascx), I hit F5 in the browser and changes automatically take effect. If I have to do changes in the .NET code (controller logic, models, repositories, etc...) I no longer use the browser. To verify that my change is correct I navigate to the corresponding unit test and hit CTRL+R+T. The result is seen either in green or red.
You don't have to stop the process, you can break.
Try breaking the project, then editing, then continue.
1) CTRL-ALT-BREAK 2) Edit your code 3) F5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With