build .net application in Jenkins using MSBuild

前端 未结 5 1177
既然无缘
既然无缘 2020-12-13 04:29

I have a .net application built on .net framework 3.5, I am trying to build this application on Jenkins CI server. I\'ve added MSBuild plugin and and have added path to the

5条回答
  •  青春惊慌失措
    2020-12-13 04:34

    To make the MSBuild plugin work, you need to configure the plugin in the Jenkins management screen.

    NOTE: in the newer Jenkins versions you find the MSBuild configuration in the Global Tool Configuration:


    Jenkins MSBuild Installation Configuration

    Note the "Name" field, where I've called this particular configuration v4.0.30319. You could call it anything you like, but ideally the name will somehow refer to the version.

    You'll need to refer to this name later in the Jenkins PROJECT that's failing.

    Note: The yellow warning implies that the Path to MSBuild field should be populated with a directory name rather than a file name. In practice you do need to enter the filename here too (ie. msbuild.exe) or the build step will fail.

    In the Jenkins project that's failing, go to the MSBuild build step.

    The first field in the build step is "MSBuild Version". If you created the build step before configuring any MSBuild versions, the value here will be (default).

    Jenkins MSBuild build-step, with (default) msbuild configuration selected

    After configuring one or more MSBuild versions, the drop down will be populated with the available configurations. Select the one you require.

    You can see here that I've now selected the named configuration that matches the installation above.

    Jenkins MSBuild build-step, with named msbuild configuration selected

提交回复
热议问题