How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK?

后端 未结 3 604
眼角桃花
眼角桃花 2020-12-08 17:07

I use Visual Studio 2012 and this is the only version of Visual Studio I have installed. I need to build certain C++ projects with the v90 platform toolset (of Visual Studio

3条回答
  •  不思量自难忘°
    2020-12-08 17:29

    It is possible, but apparently requires some maneuvering and will not support building MFC applications. The following assumes that VS2012 update 4 is installed, but neither VS2010 nor VS2008 are installed.

    1. Download the x86 DVD of SDK 7.0 SP1 (GRMSDK_EN_DVD.iso). Mount the ISO or extract its contents, and manually install the MSI files from the following folders under the Setup folder:

      • WinSDK (this may fail, it's ok)
      • WinSDKBuild
      • WinSDKInterop
      • WinSDKTools
      • WinSDKWin32Tools
      • vc_stdx86
      • vc_stdamd64
      • winsdk_intellidocs
      • WinSDKIntellisenceRefAssys
      • WinSDKNetFxTools

       

    2. Download the x86 DVD of SDK 7.1 (GRMSDK_EN_DVD.iso). Mount the ISO or extract its contents, and manually install the MSI files from the same folders listed above (except winsdk_intellidocs, which doesn't exist).

    3. Go to C:\Program Files (x86)\Microsoft Visual Studio 9.0. Copy the following files from Common7\IDE to VC\bin:

      • msobj80.dll
      • mspdb80.dll
      • mspdbcore.dll
      • mspdbsrv.exe

    Now you should be able to choose the v90 platform toolset in Visual Studio 2012 and build with it.

    Explanations (and sources):

    • Individual MSI installation is based on the second workaround from this connect report.
    • The requirement for both 7.0 and 7.1 is based on this question (both VS2010 and VS2008 are required to use v90 in VS2012!). SDK 7.1 is not needed if you have VS2010.
    • DLL/EXE copying requirement is based on yet another question. If you do not copy them, you will see error MSB6006: "CL.exe" exited with code -1073741515.

提交回复
热议问题