The Windows SDK Breaks the New TR1 Extensions in Visual Studio 2008 SP1 (Until you Repair It, That Is)

One of the main uses for my blog is to share those little annoyances that I spend hours or days solving and spare you the “fun” of going through this yourself. So, even though this isn’t really about application compatibility, which has kind of become the main theme here, it will still hopefully help save somebody some time (thanks to search engines).

I recently picked up a new laptop (Lenovo T61p, FWIW) and got everything set up according to my typical usage scenarios. I was then going about building some code, and discovered that in the transition, several of my builds had broken.

Weird, I thought. We recently moved some MFC updates and the addition of TR1 extensions to C++ from a separate feature pack into Visual Studio 2008 SP1. I was getting all of the MFC extension bits. I was missing some of the TR1 extension bits. I indexed all of the header files, and they just plain weren’t there. The shared_ptr class, for example, lived in zero header files on my hard drive.

What happened?

The fix, of course, is to just re-install Visual Studio 2008 SP1. But what broke it?

It turns out that the Windows SDK lays down files not only in C:Program FilesMicrosoft SDKsWindowsv6.1Include, but takes the liberty of laying down (older) files in C:Program FilesMicrosoft Visual Studio 9.0VCinclude. Yep – it up and clobbered the SP1 header files and broke my builds.

So, if you install the Windows Vista SP1 / Windows Server 2008 SDK, you may want to re-install VS2008 SP1 afterwards…

Comments (4)

  1. 1985 says:

    Someone should invent an installer that will prompt the user, asking if the user wants to overwrite an existing file with an older version or not.

  2. Eric says:

    It’s unfortunate that the SDK interfers with Visual Studio, but the situation *is* getting better. Much of the redundancy between the SDK and Visual Studio has been removed, preventing the "double installation" of SDK files that would occur in the VS2003/2005 days.

  3. Kenny Kerr says:

    I wrote about it here:

    The trick (for now) is to install the Windows SDK before installing the Visual Studio 2008 service pack. That way it saves a lot of time rerunning the SP1 installer.

Skip to main content