Configuring MSBuild with Linux Jenkins server

Hi Team,

We are already having Jenkins 2.176 installed on a Linux RHEL 7 server. We need to configure Jenkins to publish dotnet and sharepoint applications. Please let me know if this is possible to do and if yes, kindly provide me a reference guide article for the same.

All of my MSBuild configuration to date has been on Windows.
However, the dotnet command you need can be called from any shell step in Jenkins. I would probably go with pre-installing dotnet on your agent(s) and calling it from a job.

Do note, 2.176 is really, really, really old.

1 Like

Multiple known vulnerabilities, long unsupported by the Jenkins project.

Red Hat Enterprise Linux 7 will be unsupported by the Jenkins project after Nov 16, 2023. More details are available in the blog post

1 Like

Thanks all for the comments. Definitely we can upgrade Jenkins and Upgrade RHEL OS to 8. But I want a documentation on how to configure MSBuild for Jenkins. Kindly provide me if it is available.

1 Like

That answer has already been provided. Ken said:

Install the tools that you need on the agent computers and call those tools from an sh step.

I tried giving dotnet build /xyz.sln but the Jenkins failed and said dotnet command is not recognized. But I have installed dotnet sdk in the Jenkins linux server and if I try the same command inside the Linux box it works but from Jenkins its not working.


This problem sounds like a case of differences between environments. Often caused by a different user, or even a non desktop environment running your agent vs your login session.

I would recommend running a tool to export your environmental variables (set in windows, export or printenv in linux) in both your job and your “command prompt” to see whats different.

Often its something like HOME is set different. Or PATH has changed since its managed by jenkins agent settings. Or even a license key is missing.

Its usually a good first step.

1 Like