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

Web Development Tools Microsoft

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:

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:


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


Discussion is closed.

Feedback usabilla icon