Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit and continue in ASP.NET web projects

Tags:

asp.net

I know how to enable Edit and Continue in ASP.NET Web Application projects (see here), however, I found no information as to how to achieve the same thing in ASP.NET Web Site projects.

Is this feature available in Web Site projects? If no, it seems that converting our Web Site project to a Web Application is really worth doing.

like image 659
Mikhail Glukhov Avatar asked Mar 05 '10 15:03

Mikhail Glukhov


People also ask

What is the primary benefit of Edit and Continue functionality?

Edit and Continue is a time-saving feature that enables you to make changes to your source code while your program is in break mode. When you resume execution of the program by choosing an execution command like Continue or Step, Edit and Continue automatically applies the code changes with some limitations.

How do I turn off break mode in Visual Studio?

There is a free extension to resolve this issue: Disable No Source Available Tab available for from the VS Market Place. This small extension will prevent the tool window with title "No Source Available" from appearing in Visual Studio, and preserve the focus on the currently active tab.

What does apply code changes do in Visual Studio?

Apply the code changes using the new apply code changes (ALT-F10) button in your Visual Studio toolbar (next to the Continue button). Note that saving the files is not required when using Visual Studio, giving you the flexibility to quickly change code and keep going.


2 Answers

With a website project edit and continue is disabled by default. To enable it you must go to: Properties->Web->'Servers' section, check 'Enable Edit and Continue'. Then, if you break your code you can edit it and continue. You cannot edit the code if you are not stepping through it. i.e. you have to break before editing.

like image 200
EdMan196 Avatar answered Nov 07 '22 23:11

EdMan196


Although you can't edit the code while stepping through with the debugger, Web Site projects allow you to simply edit the source code and then reload the page. This is almost as useful as "Edit and Continue." ASP.NET dynamic compilation allows you to change the source code which triggers the automatic recompile.

Here is a related article on Understanding ASP.NET Dynamic Compilation

This page is also useful and has a section called Comparing Web Site Projects and Web Application Projects

like image 22
James Lawruk Avatar answered Nov 07 '22 23:11

James Lawruk