简体   繁体   中英

How to edit and continue in Visual Studio 2008 and ASP.Net MVC?

I'm trying to get edit-and-continue working with Visual Studio 2008 with an ASP.Net MVC project. I'm running 64-bit, so that adds to the problem.

In Configuration Manager, my active solution platform is x86 and all the projects are targeting Debug x86 as well.

In the project properties I have "Enable Edit and Continue" selected.

In Tools->Options...->Debugging->Edit and continue I have "Enable Edit and Continue" selected.

In Tools->Options...->Debugging->General I have "Break all processes when one project breaks" enabled.

As soon as I try to change some source code outside of a view/template'I get the message: Edit and continue: Changes are not allowed while code is running or if the option 'Break all processes when one project breaks' is dissabled. The option can be enabled in Tools, Options, Debugging.

Any ideas how to get it to work?

Do you have Enable Optimizations checked? (Advanced Compile Options), I don't think you can have that checked...

Also: http://blogs.msdn.com/webdevelopertips/archive/2008/11/26/tip-29-did-you-know-how-to-enable-edit-and-continue-feature-for-web-application-projects.aspx

For VS2010 try this

替代文字

You can't 'edit and continue' when the program is running. You must break to edit and continue, and if you have many threads you must break all. If when breaking, some threads continue to run, it not a problem with 'edit and continue' but a problem with the break options.

Note: You don't need to stop the program, but you must break , and then you can continue .

Are you using IIS or the built in Visual Studio development server for debugging? I've had trouble before getting edit and continue running under IIS, and ended up just using the built in server.

I open a separate browser window (so it doesn't close when I stop debugging) then I stop debugging, make changes and build them and just carry on using the other browser window to view the changes. (Yes - this works even with changes in your class files, controllers etc).

If you just want to change the views, CSS or scripts you just need to shift and refresh to make sure your browser gets the updated files rather than using the cache.

If this sounds odd to anyone - try it! It works!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM