Visual Studio 2012 Update 1 released: real, official XP targeting support

I’m happy to announce that the Visual C++ 2012 XP targeting solution is finally available as part of Visual Studio 2012 Update 1.  As you know from previous posts, I tried to fill in the gap by providing wrapper functions (XPSupport wrappers) until the official Microsoft solution was ready.    No need to use those any more, you can definitely remove those files from your project if you’ve been using them up to now.

Thanks to those at Microsoft, especially Steve Teixeira and Herb Sutter for believing that this was a worthwhile thing to provide users.  It definitely will increase adoption of Visual C++ 2012, and C++11 in general, because it’s one less thing to have to worry about when making the decision to adopt the new toolset provided by Visual C++ 2012.    Thanks also, to all those people that provided feedback through blog comments, connect bug comments, uservoice comments and various other ways that they expressed their opinion that this was an absolute adoption blocker for them.

One of the things you may notice is that you have to choose a new “Platform Toolset” if you want XP support, i.e. it’s not just a simple recompile, you actually have to change project settings.  The reason this was done was that the Developer division cannot dictate the OS support level of the Platform SDK.  Since the Platform SDK 8.0 dropped support for XP, developer division decided to ship the 7.1 SDK and redirect the include paths to that instead of using the existing 8.0 SDK.   You only get the 7.1 SDK include paths if you choose the appropriate XP targeting platform toolset, that is, vc110_xp.

Just to be clear, this doesn’t mean that by choosing the 7.1 SDK you’re all of a sudden using inferior (older) versions of the C++ compiler and runtime libraries.  On the contrary, you are now using a newer version of the CRT, MFC etc, that have been enhanced to remove any Vista+ specific API calls (i.e API calls not available on XP), along with the exact same C++ compilers and linkers that the normal 8.0 SDK toolset provides.

And another clarification: with Update 1 there is only one set of CRT/MFC DLLs and libs.  There’s no separate redistributable for XP vs other operating systems.  The single vcredist_x86.exe/vcredist_x64.exe files have been updated to work on ALL platforms.  This simplifies things from a distribution perspective.  No worry about having the incorrect redist installed on the incorrect OS.

Note: currently there is nothing stopping you from using the 8.0 SDK with your project (i.e leave your platform toolset setting alone) and still run the resultant binaries on XP.  The difference is, that it’s not officially supported and could break at any time (e.g. if Windows team delivers an update to 8.0 SDK that causes incompatibilities with XP – this hasn’t happened yet but be forewarned).  If you decide to take this approach, be sure to update the subsystem version as described in my earlier blog post.  In summary, in the IDE you can just go to project properites, then linker settings – system, and set minimum required version to 5.01.

In conclusion, happy XP targeting with VC2012 + Update 1!