Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building C# project using jenkins

First of all, im not sure if there is a specific forum thats more suitable for request about Jenkins, but I figured I just post it here.

So, I have this C# project, it right now requires Visual Studio 2015 to build and I would like to automate builds with Jenkins. This is the first time I'm using Jenkins and I was able to set it all up, it fetches the code from the gitlab repository, but right now there is no build action configured. For "fun" i tried to simply make it use a "windows batchfile" as build file and added echo test. Checking the console output it downloads the repository code and then tries to execute the batchfile, result is:

java.io.IOException: Cannot run program "cmd" (in directory "/var/lib/jenkins/workspace/Project"): java.io.IOException: error=2, No such file or directory

This of course makes sense, but I wonder now, is there a way to build a C# project with jenkins on a debian server without resorting to mono or something? I know that people build C++ projects for windows with Jenkins on a linux root, so there has to be some sort of cross compiling possibilities.

If the Visual Studio 2015 is a dealbreaker I can also strap it down to VS13 or even below. Any help is greatly appreciated!

/EDIT

Its probably important to say that Mono is NOT an option. Im using features like WPF that are not available for Mono.

like image 314
Cromon Avatar asked Nov 09 '22 19:11

Cromon


1 Answers

Use Jenkins' MSBuild plugin.

Jenkins.NET is a good blog about using Jenkins in a .NET environment. First post is here.

like image 100
Andrew Gray Avatar answered Nov 15 '22 06:11

Andrew Gray