28

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.

2
  • I believe you mean Web Site projects. Commented Mar 5, 2010 at 16:05
  • ASP.NET MVC makes this question redundant. If it's an option, do consider. Commented Jan 4, 2012 at 19:11

5 Answers 5

20

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanx for the help. Much more appreciated.
5

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

Comments

3

Edit and Continue is not supported in Web Site projects. If that is important to you I suggest going with Web Application Projects.

Comments

2

As they say, "it depends".

For both Visual Studio 2015 & Visual Studio 2017, if you want to be able to "Edit & Continue" in Web Projects, then you need to set the server for your project to "IIS Express" in the Web tab of Project Settings.

enter image description here

If you do this, you will also be able to set/hit breakpoints on the web startup code.

1 Comment

I think the VS UI could be better here. If you have Edit and Continue checked and then you change the server to IIS instead of IIS Express, it disables the Edit and Continue checkbox but leaves it checked -- which is confusing.
-3

Just in case you need this feature working in Visual Studio 2015. This feature is still supported but with little changes in options. So, if you want continue running IIS even after debugging session is stopped in Visual Studio 2015, here's the steps you should follow:

Step 1: Tool | Options | IntelliTrace | General | Check 'Enable IntelliTrace' and select 'IntelliTrave events only' option only. Note: If you select 'IntelliTrace events and call information' then this will kill IIS Express.

Step 2: Tool | Options | Debugging | General | Uncheck 'Enable Edit and Continue'.

Step 3: Try it now.

1 Comment

How does disabling "Edit and Continue" contribute towards enabling "Edit and continue"?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.