Is it possible to Edit and Continue in ASP.NET MVC 3 app using Visual Studio 2010? If so, how can I do that?
btw, my OS platform is x86.
Edit: when I hit f5 and then try to edit the code I receive the following error: Changes are not allowed while code is running or if the option 'Break all processes when one process breaks' is disabled. The option can be enabled in Tools, Options, Debugging.
Even though the option is enabled I cannot edit my code when code is running.
After a lot of messing about, googling, and (essentially) guess work, (I am actually running x64 environment) I found that the following enabled MVC 3 edit and continue for me Great !
Now I can set a break point, then hit F5, then when the break point hits - I can change my code (e.g. in controllers or class library projects referenced by the MVC web app), and continue debugging (F5 again) and the changes are picked up, and everything seems to be as it should !
Further to this, you'll find that Edit and Continue will not work on certain methods -- those with dynamically-typed variables and those with lambda expressions. You'll probably have a lot of lambda if you're using LINQ to (anything) to retrieve data from repositories, and of course ViewBag is a common dynamic in MVC applications.
So, Edit and Continue and MVC mix poorly. Which is all right, really, because it gets you into the habit of test-driven development -- write good tests, code to pass the tests, and only then build and run.
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