Jenkins: no tool named MSBuild found

前端 未结 5 1106
闹比i
闹比i 2021-02-02 02:25

Setting up a Pipeline build in Jenkins (Jenkins 2.6), copying the sample script for a git-based build gives: \"no tool named MSBuild found\". I have set MSBuild Tool in Ma

5条回答
  •  不知归路
    2021-02-02 02:46

    For anyone having this problem and just trying to figure out what 'Tool' represents in Jenkins and where it is configured, see following screenshots:

    Go to Manage Jenkins -> Global Tool Configuration:


    Scroll down to MSBuild and click the button to expand the section:


    Here you can see what tool name to use to reference MSBuild (or add one):


    Then you can reference it for example like this: bat "\"${tool '15.0'}\" solution.sln /p:Configuration=Release /p:Platform=\"x86\" (example is not declarative syntax, but should show the idea)

提交回复
热议问题