Jenkins – MSBuild configuration in jenkins

Jenkinsmsbuild

I am facing the error below during configuration of MSBuild in Jenkins:

[ImageResize] $ cmd.exe /C " msbuild.exe p:Configuration=Release
E:\Heena\Applications\ImageResize\vbimage\ImageResize.sln " && exit
%%ERRORLEVEL%% 'msbuild.exe' is not recognized as an internal or
external command, operable program or batch file. Build step 'Build a
Visual Studio project or solution using MSBuild' marked build as
failure Finished: FAILURE

Please note that I have set MSBuild path up to msBuild.exe during setting up of MSbuild plugin. I have successfully deployed Visual Studio project on jenkins, but unable to configure it with MSBuild.

Best Answer

  1. In MSBuild installations option of jenkins,

    Choose the path to MSBuild = C:\Windows\Microsoft.NET\Framework64\v4.0.30319

  2. Then go to your respective jenkins project where you want to build,

    from,Add Build Step menu choose

    Build Visual Studio Project or solution using MSBuild option

  3. MSBuild version will be what you defined in Step 1 and in MSBuild File

    type the path of your solution file and in Command Line Arguments option

    type /p:Configuration=Release.

Hope you got the answer what you were looking for.

Related Topic