Wednesday, June 26

Portable Class Library on Jenkins CI

Like any good developer I try to keep projects organized. Today we finish the first release of our globalization library which we put in a Portable Class Library (PCL) so it will be easy to use it in different projects.

When Jenkins pull the work and start to build it it compline about build errors we did not see on our development machines.

The first error was error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

We did not install Visual Studio on our Jenkins server so the same way I handle previous problems with target fiels I start by simply copy the target files from my development machine to Jenkins.
This didn't solve the problem just led me to the next problem: error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

Little digging in the on the web and I found that this time Microsoft make our life easy and have a tool to install PCL tools on build machines.

Cross-Platform Development with the .NET Framework is the title of the document inside the MSDN website. There you can read all about cross-platform development for .NET and specifically download the Portable Library Tools and install it with the switch /buildmachine

There you go, PCL on your Jenkins Build machine made easy.

No comments:

Post a Comment