Downloadable Hotfix: False C# compilation errors for ASP.NET code-behind files in SP1

Downloadable Hotfix: False C# compilation errors for ASP.NET code-behind files in SP1

  • Comments 9

In SP1 for Visual Studio 2008 and Visual Web Developer 2008, C# introduced a new feature to provide 'live' reporting of compilation errors.

Unfortunately, the introduction of this functionality also introduced a bug where in certain cases, false C# compilation errors appear in the Error List for ASP.NET Website projects.  Specifically the following is a list of issues you may have experienced due to this bug in SP1:

  • If you have a breakpoint in a code-behind file.  On project open, you get incorrect errors in the Error List for that code-behind file (e.g. – button1 is not declared).  These errors do not go away until you open that code-behind file.  Once you open the code-behind file, the errors go away.
  • When you open a code-behind file, some false errors are shown in the Error List for a second or two and then go away.

I'm happy to announce, the C# team just published a downloadable hotfix that addresses the issues described above.  You can download the hotfix at the following location: http://code.msdn.microsoft.com/kb957259.

NOTE: the hotfix will only install on an SP1 or higher version of Visual Studio or Visual Web Developer Express.

NOTE: prior to the availability of this hotfix you may have turned off C# background compilation to workaround this issue.  Once you install the hotfix you can double check to see if C# background compilation is enabled by ensuring the "Show live semantics" option is checked in Tools > Options > Text Editor > C# > Advanced:

Capture

Hopefully folks can now get the full benefit of C# live semantic errors in ASP.NET Website projects.  Cheers!

Omar Khan
Product Unit Manager
Visual Web Developer

Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post
  • Outstanding!  Thank you so much for this.

  • You've been kicked (a good thing) - Trackback from DotNetKicks.com

  • Visual Web Developer Team Blog : Downloadable Hotfix: False C# compilation errors for ASP.NET code-behind files in SP1

  • Last week was our big PDC conference, and I've been busy catching up back at work this week.  I

  • Last week was our big PDC conference, and I've been busy catching up back at work this week.  I'm

  • Last week was our big PDC conference, and I've been busy catching up back at work this week. 

  • Visual Studio Hotfix in SP1: False C# compilation errors for ASP.NET code-behind files

  • I have been in vacation for the last 2.5 weeks. Myself and my Fiance in a vehicle driving around the

  • I have been in vacation for the last 2.5 weeks. Myself and my Fiance in a vehicle driving around the

Page 1 of 1 (9 items)