# Configuring MSBuild with Linux Jenkins server

**URL:** <https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259>\
**Category:** Using Jenkins\
**Created:** [June 30, 2023, 5:15pm UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259 "2023-06-30T17:15:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SethuPriya](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@SethuPriya](https://community.jenkins.io/u/SethuPriya)\
**Post date:** [June 30, 2023, 5:15pm UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/1 "2023-06-30T17:15:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![krachynski](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/krachynski/32/2674_2.png) [@krachynski](https://community.jenkins.io/u/krachynski)\
**Post date:** [June 30, 2023, 5:24pm UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/2 "2023-06-30T17:24:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [June 30, 2023, 8:16pm UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/3 "2023-06-30T20:16:33Z")

</div>

> [@krachynski](#):
>
> Do note, 2.176 is really, really, really old

Multiple known vulnerabilities, long unsupported by the Jenkins project.

> [@SethuPriya](#):
>
> installed on a Linux RHEL 7 server

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

> **[End of life operating systems](https://www.jenkins.io/blog/2023/05/30/operating-system-end-of-life/)**
>
> Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software

---

<div class="post-metadata">

**Author:** ![SethuPriya](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@SethuPriya](https://community.jenkins.io/u/SethuPriya)\
**Post date:** [July 3, 2023, 8:20am UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/4 "2023-07-03T08:20:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [July 3, 2023, 12:01pm UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/5 "2023-07-03T12:01:42Z")

</div>

> [@SethuPriya](#):
>
> But I want a documentation on how to configure MSBuild for Jenkins

That answer has already been provided. Ken said:

> [@krachynski](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![SethuPriya](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@SethuPriya](https://community.jenkins.io/u/SethuPriya)\
**Post date:** [July 4, 2023, 11:47am UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/6 "2023-07-04T11:47:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [July 4, 2023, 6:21pm UTC](https://community.jenkins.io/t/configuring-msbuild-with-linux-jenkins-server/8259/7 "2023-07-04T18:21:12Z")

</div>

Hi,

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.
