Configure MSBuild for Jenkins installed on linux server


I am new to Jenkins. I created a jenkins file with declarative syntax,have a doubt on how to set up msbuild configuration on jenkins server installed on linux.

Is there any alternate solution to build .net applications, if we cannot configure .Net applications.

Thanks in advance

Possibly you could install .NET SDK on Linux and use dotnet msbuild, even if your projects target .NET Framework. However, .NET SDK does not support building Windows Forms or WPF projects on anything other than Windows.

Alternatively, you could keep the Jenkins controller on Linux and add one or more computers that run Windows, a Jenkins agent, and Visual Studio Build Tools. So the Jenkins agent on the Windows computer would run MSBuild.exe and send the logs and artifacts to the Jenkins controller on Linux.