Monday, January 7, 2008

Visual Studio 2008 Unusable with C++



Update 8/12/2008: Microsoft has released Service Pack 1 for Visual Studio 2008, which resolves these problems. See the last post on this page:
http://www.microsoft.com/downloads/details.aspx?FamilyID=27673c47-b3b5-4c67-bd99-84e525b5ce61

Update 3/30/2008: Microsoft has finally released two hotfixes that address these problems. See the last post on this page:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2799211&SiteID=1



I've now spent a couple of weeks using Visual Studio 2008 for C++ development, and my conclusion is that it's unusable. Those of you who follow this blog know that I'm generally supportive of Microsoft's errors, but this time there's no excuse.

Our project is about 250,000 lines of code, a relatively small project by some measures. Every few builds, you get this error:

LINK : fatal error LNK1000: Internal error during IncrBuildImage

And the build crashes. If you rebuild, it succeeds, but this doesn't help much for automated builds that rely on a deterministic compile result. The problem only appears if you have incremental linking turned on, but disabling incremental linking makes debugging unbearably slow and painful.

I'm not the only one having this problem:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=311732
If you are reading this blog, please go to that page and register your vote for an importance of five stars.

So I've just been living with that problem, since we're largely in a testing phase for VS2008 and automated builds aren't yet needed. Today I ran into another problem, and this one's a showstopper. The first time the compiler encounters a file that fails to compile because of a particular set of errors, the vc80.pdb program database file is corrupted and it's impossible to build any more files until you do a Rebuild All. Except that rebuilding everything causes the file to be rebuilt, which again corrupts the PDB file. Even if you try to compile that file by itself (using Build/Compile), the PDB file is still corrupted.

This problem was not only known, if was reported during the beta process, but never fixed:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=308775
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=309462

Both of the above problems have been open for 30 to 60 days. Perhaps a severity of "entire build fails catastrophically" isn't as serious as I think it is.

10 comments:

  1. I'm experiencing the same problem which seems to occur only with Windows Vista. Or maybe with some programs installed because my office working Windows XP SP2 PC doesn't have such a problem while my entertainment Vista PC has.

    ReplyDelete
  2. I'm experiencing the same, too.
    VS2008(jp) seems working fine on my XP SP2 PC, but not on a Vista Business PC.

    It seems that Vista UAC has some relation to the problem, though it's only a guess.

    I can't understand why they would not admit the problem.

    ReplyDelete
  3. I'm getting the same thing ..glad ther eare others I thaught my Vista install was corrupt.

    ReplyDelete
  4. I have the same problem too.
    I'm using Vista. UAC is on.

    ReplyDelete
  5. Same for us...And one rebuild takes 15 min minimum on 1 solution and we have several to build...

    ReplyDelete
  6. I´ve got the same problem too. Using Vista Business with UAC off. Still waiting for a fix!

    ReplyDelete
  7. I receive a fix from Microsoft for private use, replacing link.exe

    ReplyDelete
  8. 我也遇到了这个问题,汗,上网去搜索了一下,全是抱怨的,简直无语。本来是用vs2003的,但是那个不能调试stl内部数据,但是这个用起来更郁闷,每次都来个“内部错误”。

    ReplyDelete
  9. yeah.. Me too having the same problem... its really annoying and sometime it irritates.. rebuilding evry time becvomes hard due to quite large project .. is anyone having hotfix for this??
    Thanks in advance for your help!

    ReplyDelete
  10. Hi,
    Even am also getting the same problem whenever i change any header files in my project. It will not giives me any problem whatever changes i do in implementation files.

    Am using VS 2008 , and this problem exist on both UAC enable and disabled machine for Windows Vista and also Windows 7.

    With or With out Visual source safe installed..

    This will definatly spoiling development time..
    until i have to rebuild for the second time.

    ReplyDelete