Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
502 views
in Technique[技术] by (71.8m points)

visual studio - Edit and Continue in ASP.NET MVC 3 application

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 !

  1. Setting all the projects to x86 in configuration manager
  2. Setting my WebApp project output path to "bin" in the properties window
  3. Setting my WebApp project to use Visual Studio Development Server (project properties > Web tab)
  4. following the 2 simple instructions from Pro ASP.NET MVC 3 Framework, Third Edition

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 !


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...