Jenkins: no tool named MSBuild found

前端 未结 5 1094
闹比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:56

    You have to define MSBuild in Jenkins => Manage Jenkins => Global Tool Configuration or use a different toolname which is already defined.

    ${tool 'toolname'}  returns the path defined for a tool in Global Tool Configuration.
    

    Warning: Pay attention to the path defined. Does it point to a folder or to msbuild.exe? You might have to append msbuild.exe:

     ${tool 'VS2017'}\msbuild.exe
    

    A simple snapshot for explaining the concept:

提交回复
热议问题