Welcome to MSDN Blogs Sign in | Join | Help

View This Blog In

Announcing: C# Edit and Continue support for Visual Studio 2005

A few weeks ago, I updated my blog by writing about Microsoft’s commitment to VB.Net.  This posting generated a healthy discussion between C# & VB developers with both camps championing their favorite features.  A nice feature for our VB customers in Visual Studio 2005 (and also Visual C++) is ‘Edit & Continue’ (E&C).  For those of you not familiar with E&C, E&C enables you to make changes to your code while an application is being debugged.  Imagine that you are debugging a complex application.  Suddenly, you see that you’ve made an error in your application.  Sighing, you stop the application, make the correction and start the code-compile-debug cycle all over again.  This means that you spend a lot of time recompiling the application even if you’ve changed only one line of code.  E&C changes this and reduces the time required to fix bugs.  In the above scenario, you could just fix the SQL query and continue debugging the application from the same point.

 

One of the top feedback requests from our customers is support for Edit & Continue (E&C) in C# in Visual Studio 2005.  I am excited to announce that the C# team took your feedback to heart and has added support for E&C in Visual Studio 2005.

 

We have always maintained that you should program in the language you’re most comfortable with. If you like E&C but prefer programming in C#, Visual Studio 2005 will enable you to do just that.  This is a great example of the large number of customer driven features in Visual Studio 2005. Adding E&C to Visual C# is currently one of the top requested customer suggestions on the MSDN Product Feedback Center. Visual C# 2005 in Whidbey has been significantly improved by adding innovative language constructs, new compiler features, dramatically enhanced developer productivity, and an improved debugging experience.

 

We will be putting out the next Community Technology Preview for Visual Studio 2005 next week.  This will contain the C# E&C feature.  Give it a whirl and let us know how you like this!

 

Check out this page to see the latest information on Visual Studio 2005 and for a link to the latest Community Technology Preview when we make this available next week. 

 

Namaste!  

Posted: Friday, October 15, 2004 9:28 AM by Somasegar

Comments

Andrey Skvortsov said:

Thanks!
# October 15, 2004 9:37 AM

Guayo said:

Great news!
Thanks a lot and kudos to the C# team!
# October 15, 2004 9:45 AM

Bleeding Eyes said:

That is truly superb news. Thanks for the info.
# October 15, 2004 10:00 AM

ToddM said:

<faint>

Sweet stuff! It always bugged me that VB was getting this, but not C#. You've made me (and I'm sure countless others) very happy.
# October 15, 2004 10:01 AM

jaybaz [MS] WebLog said:

# October 15, 2004 1:03 PM

Hugo Hallman said:

Fantastic! Greatest news since VS 6!
# October 15, 2004 10:05 AM

Jay Nathan said:

This really wasn't a new request, though.

Those of us who started using VS.NET in the original betas were clamoring for it then, and we thought that it was surely going to be included in VS.NET 2003. It was one of those things that was just sort of expected from the new environment, and finding out that it wasn't there was almost a shock.

We simply didn't realize the impact of a new language on a feature that we had come to know and love from the VB development environment.
# October 15, 2004 10:06 AM

Paul Wilson said:

Excellent!
# October 15, 2004 10:21 AM

The Millionth Monkey Speaks said:

http://blogs.msdn.com/somasegar/archive/2004/10/15/242853.aspx I'm totally stoked about this... People have been asking for this since the 1.0 (VS 7.0). Kudos to the entire E&amp;C team....
# October 15, 2004 1:38 PM

Paul Fallon's WebLog said:

# October 15, 2004 1:41 PM

Paul Fallon's WebLog said:

# October 15, 2004 1:43 PM

Ingo Rammer's Weblog said:

It's official: Edit and Continue will be in C# 2.0. Thank you!...
# October 15, 2004 1:44 PM

Eric Gunnerson's C# Compendium said:

# October 15, 2004 1:51 PM

SteveJS's WebLog said:

# October 15, 2004 1:58 PM

Rob Cannon said:

Will the next CTP be integrated with Team System?
# October 15, 2004 11:04 AM

Dan Fernandez's Blog said:

# October 15, 2004 2:05 PM

Tom's Ramblings said:

# October 15, 2004 2:10 PM

Steve Hall said:

Finally! C# becomes a "First-Class Citizen Language" just like VB! (snicker! snicker!)
# October 15, 2004 11:25 AM

Erebuss Blog said:

# October 15, 2004 2:26 PM

Jekke Bladt said:

Edit and Continue in C#
# October 15, 2004 2:44 PM

Jekke Bladt said:

Edit and Continue in C#
# October 15, 2004 2:48 PM

Jekke Bladt said:

Edit and Continue in C#
# October 15, 2004 2:48 PM

Eric W. Bachtal said:

That's great news - thanks!
# October 15, 2004 11:53 AM

Sean Chase said:

Nice! Will it work with ASP.NET? I heard there is some limitations there. What's the story?
# October 15, 2004 12:01 PM

TheChaseMan's Frenetic SoapBox said:

# October 15, 2004 3:05 PM

Girish Bharadwaj said:

# October 15, 2004 3:18 PM

Brad's Weblog said:

# October 15, 2004 3:34 PM

S. Somasegar said:

Our plan moving forward on VS2005 CTPs is to alternate between the Express editions and the Visual Studio Team System. So, for example this month's CTP will include the Express editions and the next CTP following that will have VSTS.
# October 15, 2004 12:49 PM

Gary DesRoches said:

The C# team have made C# programmers everywhere happy! Thanks!
# October 15, 2004 1:07 PM

Yaiz said:

Cool, is the My namespace comming to c# too
# October 15, 2004 1:46 PM

S. Somasegar said:

No immediate plans for adding the My namespace to c#.
# October 15, 2004 1:51 PM

DNA said:

C# E&C = Productivity^2
# October 15, 2004 2:01 PM

Scooter's Musings said:

# October 15, 2004 5:07 PM

Scooter's Musings said:

# October 15, 2004 5:18 PM

Martin's WebLog said:

# October 15, 2004 5:54 PM

Deepa Gill said:

How stable is it going to be, so late in the release cycle?
# October 15, 2004 2:55 PM

S. Somasegar said:

I would rather have you try it out with the CTP drop and let me know :).

Seriously, the team has been working on this for a while now. We absolutely feel that it will be high quality by the time we ship, otherwise I would not have included that in the product.

Looking forward to hearing your feedback.
# October 15, 2004 3:11 PM

Josh Blair's Blog said:

# October 15, 2004 6:45 PM

[ Willy Marroquin ] said:

More Of VB Style :)

http://www.WillyDev.Net
# October 15, 2004 3:47 PM

Deepa Gill said:

Thank you for your excellent feedback. Very excited to try it out. So are the VB guys getting refectoring? ;)
# October 15, 2004 4:36 PM

Mike Flasko said:

One of the best VB features in c# now - right on!
# October 15, 2004 5:52 PM

M. Keith Warren said:

You have restored my faith in MSFT and it's commitment to developers and what they are asking for!
# October 15, 2004 6:02 PM

Thushan Fernando said:

# October 15, 2004 9:15 PM

Michael Swanson's Blog said:

# October 15, 2004 9:26 PM

Chris said:

How about making the current debugger work correctly - then I'll faint with joy.
# October 15, 2004 7:02 PM

Terence Ting said:

Thank you. Thank you. Thank you..... from a guy who had done VB6 for 7 years.
# October 15, 2004 7:31 PM

norlan said:

YAHOOOOOOOOO, thank you C# Team
# October 15, 2004 9:54 PM

Jared Evans said:

Thanks! This will be very useful and cut down on development time!
# October 15, 2004 11:32 PM

Code/Tea/Etc. said:

# October 16, 2004 3:04 AM

karim said:

Sounds cool. But is it availabel in the VS2005 Express edition ?
# October 16, 2004 1:02 AM

Tommy Carlier said:

Will it also be available in the C# Express Edition, or only in VS2005?
# October 16, 2004 1:36 AM

uwe said:

So the release date will be delayed further?
# October 16, 2004 2:27 AM

Daniele Bochicchio said:

# October 16, 2004 5:28 AM

.NET Forever said:

# October 16, 2004 5:56 AM

Evolve Develop Blog said:

# October 16, 2004 6:28 AM

Christian Nagel's OneNotes said:

# October 16, 2004 6:47 AM

S. Somasegar said:

Edit and continue for both C# and VB does not work for ASP.NET. There were two major reasons for this. The first and by far the most important reason is that the ASP.NET team felt that their current model was already incredibly iterative even without E&C and that trying to apply the same model that we use for client apps would actually be more restrictive. The reason is that the ASP.NET model is generally compile on the server. So in order to get updated changes, see new content, hit breakpoints on newly added code, you can just hit F5 on the page in IE to refresh. That hits the server and tells ASP.NET to recompile the changes. If we were to use an E&C model instead then the set of ‘rude edit’ restrictions would need to be in place, so it would suddenly become illegal to add new public methods.

The second reason was simply that it was technically difficult to do and even in the very early planning stages of E&C for Whidbey both VS and the CLR were trying to limit the scope such that we didn’t end up in the same position with E&C that we did for 2002.

# October 16, 2004 4:54 AM

TheSaib CS's Blog powa !!! said:

# October 16, 2004 8:03 AM

TheSaib CS's Blog powa !!! said:

# October 16, 2004 8:04 AM

James Crowley said:

Will we be able to use Edit & Continue in assemblies referenced by an ASP.NET project as we execute a page? (if that makes sense...)
# October 16, 2004 5:32 AM

Rays of Thoughts said:

Edit
# October 16, 2004 8:56 AM

blog.dreampro said:

# October 16, 2004 11:42 AM

Klaus Aschenbrenner - Looking into a smart future. said:

# October 16, 2004 3:06 PM

S. Somasegar said:

Several people have asked me about whether Edit & Continue will be in the Express Edition of the product.

The answer is - absolutely yes!

This is true for E&C both for VB Express and C# Express in VS2005.

- somasegar
# October 16, 2004 9:27 PM

Mike Stall's .NET Debugging Blog said:

# October 17, 2004 12:31 AM

denoir said:

Thank you. Thank you. Thank you :-)

This will truly be a great time saver for those of us working on larger projects that take a long time to start up.
# October 16, 2004 10:38 PM

MrDave's Blog! said:

# October 17, 2004 2:06 AM

Blogging About .NET said:

# October 17, 2004 4:56 AM

James Snape said:

Trackback
# October 17, 2004 2:41 AM

TrackBack said:

S dot One heeft het over .NET &raquo; C# vs VB.Net : 1 - 0
# October 17, 2004 6:58 AM

VinceX.NET's WebLog said:

# October 17, 2004 6:00 PM

Wintellog said:

# October 17, 2004 6:46 PM

Wintellog said:

# October 17, 2004 6:47 PM

Dennis Mulder's blog said:

# October 18, 2004 1:07 AM

ne0san's blog said:

# October 18, 2004 2:33 AM

ne0san's blog said:

# October 18, 2004 2:34 AM

Dev Notes said:

# October 18, 2004 3:08 AM

/egilh said:

# October 18, 2004 4:47 AM

miguel jimenez's coding blog said:

# October 18, 2004 4:57 AM

Gary Short said:

# October 18, 2004 6:14 AM

Gary Short said:

# October 18, 2004 6:25 AM

青柳臣一 blog : .NET や C# がメインの blog said:

VS 2005 - C# でもエディット&コンティニューをサポート
# October 18, 2004 6:35 AM

:: AB :: said:

# October 18, 2004 8:04 AM

No Fun Intended said:

# October 18, 2004 9:26 AM

Keith Nicholson said:

Fantastic. I was really thinking about going back to VB.NET because of E&C (Yes, it is that important!). Now I can continue in my favorite language.
# October 18, 2004 7:17 AM

Sergio Pereira said:

Soma, this is great news. Could you elaborate more on the "not works in ASP.NET" part ? I mean, like many of the folks out there, 80% of all the code I write in .Net is to be used ultimately in an ASP.NET application. Are you saying that I'll only be able to use E&C in .exe projects or .dlls being used in .exe projects ? Or something liek this? That would be a let down for me.
# October 18, 2004 7:21 AM

.NET Update said:

# October 18, 2004 10:32 AM

Kristian Kristensen's Blog said:

Ja, det er nok ike g
# October 18, 2004 11:32 AM

Josh Pollard said:

# October 18, 2004 11:32 AM

Panopticon Central said:

# October 18, 2004 3:37 PM

Panopticon Central said:

Be like Lance...
# October 18, 2004 3:37 PM

Andy Pennell's WebLog said:

# October 18, 2004 4:53 PM

Ulixes said:

Thank you very much!
The idea of MS Feedback Center is really great, I think it will be a powerful instrument.

# October 18, 2004 4:42 PM

John Lyon-Smith's Blog said:

# October 18, 2004 8:37 PM

Michael Swanson's Blog said:

# October 18, 2004 8:43 PM

dank said:

Cool News, now C# programmers will have time to wash their hair!
# October 18, 2004 6:38 PM

David Hayden - Sarasota Web Design Development - F said:

# October 18, 2004 10:02 PM

Edgar S said:

# October 19, 2004 12:38 AM

Sudhakar said:

Well, Microsoft has got a big set of ears :-)
# October 18, 2004 10:29 PM

Ramblings by PeterI said:

Just seen this one wander past, edit &amp; continue is (finally) in C#.http://blogs.msdn.com/somasegar/archive/2004/10/15/242853.aspxI've always liked it in VB6 but it does awful things for your stability (unsurprising really). It's just so nice to have w
# October 19, 2004 4:37 AM

Ian Blackburn's Weblog said:

# October 19, 2004 5:05 AM

Jeff Donnici said:

# October 19, 2004 1:12 PM

google said:

if
# October 20, 2004 2:08 AM

Woo Seok Seo said:

Very very good job!!!!
# October 21, 2004 4:53 AM

Matt said:

Brilliant news www.mattlittle.co.uk
# October 21, 2004 5:39 AM

Mike Cole's .NET Blog said:

# October 21, 2004 2:32 PM

Joe Stagner - Frustrated by Design ! said:

# October 21, 2004 6:41 PM

Amir said:

It's nice, but the most important thing is to put in massive refactoring and intelligent code generation features - above and beyond any E&C features.

And if you really want to get dirty, then the above for C++ is absolutely crudial nowadays...
# October 23, 2004 4:57 AM

ms44cn said:

Wonderful
Thanks Microsoft
Like it.
# October 24, 2004 6:45 PM

Carsten Wiitte said:

Thank you very much! E&C was my most missed feature for C# ever... :)
# October 25, 2004 12:32 AM

Saravana said:

Edit and Continue for C# in VS 2005
# October 25, 2004 9:06 AM

Peťův blog said:

Jak se dozvídám na http://blogs.msdn.com/somasegar/archive/2004/10/15/242853.aspx , v další Community Technology Preview verzi bude tato již dlouho požadovaná featura přidána. Visual Studio 2005 se tímto posouvá o další úroveň výše, mnohé díky směřují jeh
# October 25, 2004 10:49 AM

Abhishek Ghuwalewala said:

So, its been 2 weeks but I have not seen another communitey tech preview of VS 2005. Any news on when that will actually be coming?
# October 28, 2004 8:19 AM

S. Somasegar said:

You can get the latest Community Technology Preview for VS2005 (October drop) at
http://lab.msdn.microsoft.com/vs2005/downloads/default.aspx.
# October 28, 2004 9:41 AM

JavaKid said:

Thanks for pointing me to the MSDN Product Feedback Center. That is exactly what I have been looking for. I will be making several suggestions over the next couple of months. There are so many opportunities for growth within Visual Studio .Net, hopefully by actively participating within the community Microsoft will listen and we can start to turn it into the powerful IDE that we all expect.
# October 28, 2004 9:34 PM

S. Somasegar said:

Looking forward to seeing your suggestions and input via MSDN Feedback Center. Together, we can absolutely build and deliver something that we all want.
# October 28, 2004 9:43 PM

cwillis said:

This is very nice to hear. However, I understand ASP.NET does not support E&C. Which projects types do support it? I assume WinForms, but do console apps and class library projects support E&C?
Along these lines, if Winforms support E&C, could you drop the cassinni web server code (or something similar) in to a winform exe and thus get E&C to work for ASP.NET pages, under C# no less?
# October 29, 2004 7:21 AM

.Net said:

# October 31, 2004 1:12 AM

Shabab said:

Sweettttt!!!
# October 30, 2004 10:13 PM

.Net said:

# October 31, 2004 1:14 AM

google said:

ff
# November 3, 2004 2:10 AM

S. Somasegar said:

I have heard several requests for information on whether E&C would work for ASP.NET. Somebody even asked whether we could make it work by dropping the cassini web server code.

First of all, E&C will work for all types of Client apps, class libraries, console apps, windows forms, etc.

In VS 2005, it’s not possible to use E&C in ASP.NET pages even while debugging the cassinni source. In this case it would be possible to manipulate the web server code itself, but not the pages that were loaded and executed. The work needed to support E&C for ASP.NET has less to do with the interaction with the web server and more to do with the general compilation model that ASP.NET uses. In order to correctly support E&C Visual Studio must have tight communication between the debugger, compiler, project system and language service (IntelliSense). In ASP.NET the code which will ultimately be loaded and executed is generated and compiled through the CodeDom which shells out to the command line compiler. This causes problems for the language service, compiler, and project system interaction because the code which is actually run isn’t known by any entity other then the worker process. Therefore detecting edits that shouldn’t be allowed as well as determining the correct methods to recompile and emit is not currently possible.


I have been watching the posts with respect to supporting E&C in ASP.NET, and given the amount of feedback it’s definitely something that we’ll look at for the future. Interestingly it may be a reaction that changes over time. In the comments here http://blogs.msdn.com/jaybaz_ms/archive/2004/10/15/242884.aspx#FeedBack, cwillis felt that:


“Thanks!! I wanted to switch from VB to C#, but wasn't because E&C was only in VB. Now I can. This actually changes my image of Microsoft. They do listen!

Now.... no one is ever satisfied are they? How abouts getting E&C to work under ASP.NET? Web developers like to be productive too! :)”

However, after a day or two of playing around with the product he mentioned that:

“I just tried the beta Web Developer Express with ASP.NET 2, and it looks like E&C may not be as important as it would first seem. I changed a line in the code behind, saved the file, and refreshed the page, and the new code was executed. I then danced with joy. I didn’t have to click stop! That is a frikkin miracle compared to what I endure numerous times each hour now with the around 90 second delay between clicking stop and getting back to where I was. So, if session state and all that other nice ASP stuff can be held in memory after a code change, and I don’t have to click stop, I will surely be able to cope without E&C in ASP.NET. I will be happy. ”

# November 4, 2004 9:29 PM

cwillis said:

Thanks for the follow-up. Regarding E&C for ASP - I think it boils down to the amount of time it takes to get back to business after a code change.
Not clicking Stop is very very nice indeed, but if this delay can be kept to a few seconds (< 5), and session and application state can be held, then I would guess you might not need E&C at all for ASP.NET. I did see a small delay in changing code under Web Developer Express in the code behind, but when I changed something in a separate DLL in the 'Code' folder, it took about 30 seconds. Hopefully that can improve under the final 2005 version.
# November 5, 2004 1:25 PM

Hugo Batista's blog said:

# November 8, 2004 11:22 AM

axel said:

This is great! Are there public changes in the compiler or assembly API to make E&C happen? E.g. I would assume that the same infrastructure you need for E&C would really help people to develop dynamic expression evaluators that can keep context.
# November 10, 2004 3:48 PM

Julson said:

# November 15, 2004 9:34 PM

MBA said:

Helpful For MBA Fans.
# December 18, 2004 10:47 AM

scooblog by josh ledgard said:

# December 30, 2004 12:10 PM

DotNetAnders said:

From Somasegars weblog:
Someone has finally taken to their senses and introduced edit and
continue...
# January 15, 2005 12:29 PM

Julson said:

# February 20, 2005 1:14 PM

GrantRi's WebLog [MS] said:

# March 17, 2005 1:24 PM

GrantRi's WebLog [MS] said:

# March 17, 2005 1:56 PM

Eldar (NasdaqNM: ERJR) said:

# August 9, 2005 9:32 AM

Eldar (NasdaqNM: ERJR) said:

# August 11, 2005 1:04 AM

Eldar (NasdaqNM: ERJR) said:

# August 11, 2005 1:05 AM

Hugo Batista said:

THANKS!
# April 19, 2006 5:56 PM

Hugo Batista said:

# April 19, 2006 5:56 PM

Hugo Batista said:

# April 19, 2006 7:07 PM

Hugo Batista said:

# April 19, 2006 7:07 PM

Hugo Batista said:

# April 19, 2006 7:19 PM

Hugo Batista said:

# April 19, 2006 7:19 PM

dee said:

is der any1 hu cud help me to edit the value in a class after type a comand in a console application c#.........tnx

# October 27, 2007 4:44 AM

Walter Deodiaus said:

Off topic, but similar

BTW, does anyone know how to use devStudio 2005 but with .net 1.1?  I tried using MSBuild and MSBee, but this is still problematic.  

# November 1, 2007 2:53 PM

Edit and Continue in C# said:

# November 18, 2007 2:07 PM

submitsim said:

Hello everybody

I am using c#.

I want to know to programatically change my C# code in order to get it compiled by distcc.

does any body know how to use distcc with c# sample program ?

or maybe how to change the compiler in C# and use the distcc instead.

please help.

# January 5, 2008 6:02 AM

The Coffeehouse said:

One goal of this site is to provide customers with insight into how we build software.

# June 4, 2008 7:34 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS


Page view tracker