Ira Lukhezo’s blog

September 1, 2008

Switch off/on Visual Studio 2008 Background Compilation

Filed under: General — Ira Lukhezo @ 5:39 pm

A new feature in the Visual Studio 2008 service pack 1, is background compilation of code to check for errors as it’s written. This facility has existed in Visual Basic for some time now, though I doubt it was ever this fast. What you get in the IDE is a red squiggle (similar to a spell check error) notifying the programmer a mistake is made. In this example I am mistakenly trying to assign a string value to an integer.

ErrorMessage

This type of error checking is all-over-the-place and saves one significant amounts of time, principally because errors are corrected sooner, meaning one doesn’t compile a project and then find loads of errors. I have a huge project, that I feel is being slowed down by this, and need to check whether the background compilation is affecting "snappiness" of the IDE.

To do this (In Visual Studio) go to Tools and then Options.

In the Options dialog select the Text Editor node, then C# and go the the Advanced node. Remove the check in "Show live semantic errors" to disable background compilation, or conversely check it to enable the feature.

SemanticErrors

I would be interested to know if other users are experiencing a sluggish IDE – especially in the larger projects. It therefore "appears" that for larger projects, the time you save in fixing silly errors, is lost in IDE speed – disproportionate of course – but further testing is required.

4 Comments »

  1. Thanks man, this feature really improves the environment working speed.

    Comment by Xoperator — October 25, 2008 @ 4:04 pm

  2. [...] in your code for runtime checking, static analysis, and documentation. You may be aware of background compilation that was added to the C# compiler in Visual Studio 2008 SP1. This is a real advancement for static [...]

    Pingback by Code Contracts forthcoming in .NET 4.0 « Ira Lukhezo’s blog — February 25, 2009 @ 10:26 am

  3. I am running Visual Studio 2008 professional ver. 9.021022.8 RTM. My version is not background compiling, and I do not have a “show live semantic errors” option in the text editor -> C# -> advanced
    options page. Any idea why not?

    Comment by Michael Bellanger — February 3, 2010 @ 7:26 pm

  4. Have you installed both the Visual Studio 2008 SP1 and the .NET 3.5 SP1?

    Comment by Ira Lukhezo — February 3, 2010 @ 8:05 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.