Team city unmet requirement: MSBuildTools12.0_x86_Path exists

后端 未结 11 2408
深忆病人
深忆病人 2020-12-12 21:50

I have a TeamCity install on x32 Server2008 windows machine. I\'ve run the .net 4.5 web install. I\'ve also copied over the files from my x64 machine based on this article

相关标签:
11条回答
  • 2020-12-12 21:53

    I seemed to solve this issue by going into the registry and deleting all entries for MSBuild that weren't for version 12, then restarted the agent.

    To do that, go to Start > Run and type in Regedit

    Then navigate to the key:

    HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > MSBuild

    Delete all versions except for 12.0.

    Go down the next level to ToolsVersions and delete the non-12.0 versions there.

    0 讨论(0)
  • 2020-12-12 21:55

    A bit of a late answer, but if your project is from VS 2012, and you're using the autodetected solution file build step, editing that step and choosing "Microsoft Visual Studio 2012" from the "Visual Studio" drop down fixes this issue as well (and, IMHO, more correctly).

    0 讨论(0)
  • 2020-12-12 21:56

    I'm also a bit late to the party but I thought I'd share the following in case it helps any poor soul out there.

    • I got the above mentioned error on a fresh install of TeamCity 8.1.4 on a new Windows Server 2012 R2 box
    • Followed the instructions in this thread and the error still appeared despite numerous restarts and reinstalls.
    • I noticed that the agent info such as OS and CPU was not appearing on the agent details page. This indicated that the problem was not with the .NET and MSBUILD prerequisites but were instead related to the agent service not being able to read info about the machine.
    • The agent was running under a user's account (with all the necessary permissions as per the TeamCity documentation). But I thought I'd see what would happen if I went in to Admin Tools > Services and changed the Log On to Local system account.
    • Restarted the agent service.
    • Great success.
    0 讨论(0)
  • 2020-12-12 21:59

    In my case I have TeamCity Professional 2018.1 on Windows 2016 Server. I downloaded Build Tools for Visual Studio 2017 from here: https://visualstudio.microsoft.com/downloads/ and selected all options for build tools. After install I added MSBuild to the global PATH environment variable. C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin in my case.

    0 讨论(0)
  • 2020-12-12 22:00

    As was stated above, autodetected build step is probably picked up wrong Visual Studio version. Change it using Visual Studio dropdown under Build Steps section on Build Configuration settings page:

    0 讨论(0)
  • 2020-12-12 22:08

    I had the same problem and at the end it turned out that my defined build step to run MSBuild was configured wrong.

    In my MSBuild build step the setting "MSBuild ToolsVersion" was set to 12.0 (default), which lead to the error "Unmet requirements: MSBuildTools12.0_x86_Path exists" on my system. Because I don't need the new MSBuild 12.0 to run my build, I changed this setting to 4.0 in my build step. This MSBuild version is correctly installed on my system. This solved the issue for me.

    0 讨论(0)
提交回复
热议问题