The build tools for Visual Studio 2008 (Platform Toolset = 'v90') cannot be found

Deadly 提交于 2019-12-23 16:32:55

问题


I'm trying to build project c++ on vs2017 but there error appear: "The build tools for Visual Studio 2008 (Platform Toolset = 'v90') cannot be found " after navigation, I must download VS 2008 I have installed it, but problem still exist . any Suggestion ?


回答1:


The projects are targeting the v90 platform toolset. The solution is to either open the .sln file with VS2008 (i.e. use the right tool), or spend some time updating the projects to target the latest platform toolset (i.e. VS2017). To do that, just right click each project, and go to Properties, then look at General | Windows SDK Version. You may have to fix compilation / linker errors following the project upgrade.




回答2:


You need:

  • An MSVC 9.0 compiler toolchain
    • https://wiki.python.org/moin/WindowsCompilers lists the products that have it:
      • VS 2008, "Visual C++" feature and "x64 compilers and tools" subfeature
        • Express edition only has x86 compilers
        • Do install SP1 on top of VS2008 -- in vanilla VS2008 installer, installation for many features, including x64 compilers, is broken
      • WinSDK 6.1
      • WinSDK 7.0
      • "Visual C++ Compiler for Python 2.7" package
  • MsBuild 4.0 toolset configuration files for the above toolchain. (These are the directories c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\<arch>\PlatformToolsets\v90\ with .props and .targets files in them)

    • The only product I know that has this package is VS 2010 ("Visual C++" feature and "x64 compilers and tools" subfeature).
    • (WinSDK 7.1 technically has it, too, but its setup is riddled with bugs and broken on an x64 system.)
      • (You can bypass the buggy installer though if you install <GRMSDK_EN_DVD.iso>\Setup\vc_stdx86\vc_stdx86.msi directly. Despite the name, it has toolset files for all 3 platforms.)


    "Visual C++ Compiler for Python 2.7" package is not supported by these toolset configuration files. So if you use it, you'll need to either manually specify its location in one of registry values specified in .props, or modify .props to also look in HKLM\Software\Microsoft\DevDiv\VCForPython.




回答3:


It is possible to upgrade the project file from the command line without opening it in Visual Studio. I was running into the same issue, and found another solution in the Microsoft documentation for Visual Studio (https://docs.microsoft.com/en-us/visualstudio/ide/reference/upgrade-devenv-exe?view=vs-2017).

Here are the steps:

  1. Open the developer command prompt for you version of Visual Studio, e.g. 'Developer Command Prompt for VS 2017'.
  2. Navigate to the directory of your project file.
  3. Execute the following command: devenv myproject.sln /upgrade


来源:https://stackoverflow.com/questions/54626642/the-build-tools-for-visual-studio-2008-platform-toolset-v90-cannot-be-foun

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!