Using Jenkins on a Mac

VegasJVegasJ USUniversity ✭✭

I am trying to setup a CI server on a Mac using Jenkins. It will be eventually be building Xamarin solutions. Currently I have it checking code out from our svn server, doing a restore for the Nuget packages, and finally trying to build the projects.

I currently am testing this on a Xamarin .NET 2.0 standard library. The checkout and restore work but on the build step I get errors saying I am missing references to Mscorlib amongst other things. I can build the project in Visual Studio on Mac just fine. What am I doing wrong with the setup?

I have the Jenkins MSBuild plugin setup to run msbuild from /Library/Frameworks/Mono.framework/Commands/msbuild. Below is the console output from Jenkins:

Started by user admin
[EnvInject] - Loading node environment variables.
Building in workspace /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin
Cleaning local Directory .
Checking out https://svn.MyComp.net/svn/MyProj/MyProjMobile/MyProjMobile/MyProjMobile at revision '2018-04-05T13:45:47.739 -0700' --quiet
Using sole credentials MyUsername/****** in realm ‘<https://svn.MyComp.net:443> VisualSVN Server’
At revision 62

No changes for https://svn.MyComp.net/svn/MyProj/MyProjMobile/MyProjMobile/MyProjMobile since the previous build
Path To MSBuild.exe: /Library/Frameworks/Mono.framework/Commands/msbuild
FATAL: Unable to use this plugin on this kind of operation system
Executing the command /Library/Frameworks/Mono.framework/Commands/msbuild /t:restore /t:build /p:Configuration=Release /p:RestoreSources=http://192.168.102.158/MyCompNuget/nuget%3Bhttps://api.nuget.org/v3/index.json /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj from /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin
[MyProjMobile.Xamarin] $ /Library/Frameworks/Mono.framework/Commands/msbuild /t:restore /t:build /p:Configuration=Release /p:RestoreSources=http://192.168.102.158/MyCompNuget/nuget%3Bhttps://api.nuget.org/v3/index.json /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj
Microsoft (R) Build Engine version 15.4.0.0 (xplat-master/67e8006d Thu Mar  8 17:15:24 EST 2018) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 4/5/2018 1:45:51 PM.
Project "/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj" on node 1 (restore;build target(s)).
Restore:
  Restoring packages for /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj...
  Committing restore...
  Generating MSBuild file /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/obj/MyProjMobile.csproj.nuget.g.props.
  Generating MSBuild file /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/obj/MyProjMobile.csproj.nuget.g.targets.
  Writing lock file to disk. Path: /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/obj/project.assets.json
  Restore completed in 855.8 ms for /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj.

  NuGet Config files used:
      /Users/MyComp/.config/NuGet/NuGet.Config

  Feeds used:
      http://192.168.102.158/MyCompNuget/nuget
      https://api.nuget.org/v3/index.json
PrepareForBuild:
  Creating directory "bin/Release/netstandard2.0/".
  Creating directory "obj/Release/netstandard2.0/".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  /Library/Frameworks/Mono.framework/Versions/5.8.1/lib/mono/4.5/csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1705,1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;RELEASE;NETSTANDARD2_0 /reference:/Users/MyComp/.nuget/packages/bcrypt.net-next/2.1.3/lib/netstandard2.0/BCrypt.Net-Next.dll /reference:/Users/MyComp/.nuget/packages/MyComp.encryptionservice/1.0.1/lib/netstandard1.3/EncryptionService.dll /reference:/Users/MyComp/.nuget/packages/freshmvvm/2.2.4/lib/netstandard1.0/FreshIOC.dll /reference:/Users/MyComp/.nuget/packages/freshmvvm/2.2.4/lib/netstandard1.0/FreshMvvm.dll /reference:/Users/MyComp/.nuget/packages/microsoft.csharp/4.0.1/ref/netstandard1.0/Microsoft.CSharp.dll /reference:/Users/MyComp/.nuget/packages/microsoft.win32.primitives/4.3.0/ref/netstandard1.3/Microsoft.Win32.Primitives.dll /reference:/Users/MyComp/.nuget/packages/modernhttpclient-updated/2.6.1/lib/netstandard2.0/ModernHttpClient.dll /reference:/Users/MyComp/.nuget/packages/newtonsoft.json/9.0.1/lib/netstandard1.0/Newtonsoft.Json.dll /reference:/Users/MyComp/.nuget/packages/pclcrypto/2.1.17-alpha-g5b1e8dff8c/lib/netstandard1.0/pclcrypto.dll /reference:/Users/MyComp/.nuget/packages/pinvoke.kernel32/0.5.126/lib/netstandard1.1/PInvoke.Kernel32.dll /reference:/Users/MyComp/.nuget/packages/pinvoke.windows.core/0.5.126/lib/netstandard1.1/PInvoke.Windows.Core.dll /reference:/Users/MyComp/.nuget/packages/sqlite-net-pcl/1.4.118/lib/netstandard1.1/SQLite-net.dll /reference:/Users/MyComp/.nuget/packages/MyComp.sqlite.net.cipher.std/1.0.0/lib/netstandard1.3/SQLite.Net.Cipher.dll /reference:/Users/MyComp/.nuget/packages/MyComp.sqlitenetextensions.std/1.0.0/lib/netstandard1.3/SQLiteNetExtensions.dll /reference:/Users/MyComp/.nuget/packages/MyComp.sqlitenetextensionsasync.std/1.0.0/lib/netstandard1.3/SQLiteNetExtensionsAsync.dll /reference:/Users/MyComp/.nuget/packages/sqlitepclraw.bundle_green/1.1.9/lib/netstandard1.1/SQLitePCLRaw.batteries_green.dll /reference:/Users/MyComp/.nuget/packages/sqlitepclraw.bundle_green/1.1.9/lib/netstandard1.1/SQLitePCLRaw.batteries_v2.dll /reference:/Users/MyComp/.nuget/packages/sqlitepclraw.core/1.1.9/lib/netstandard1.1/SQLitePCLRaw.core.dll /reference:/Users/MyComp/.nuget/packages/system.appcontext/4.3.0/ref/netstandard1.6/System.AppContext.dll /reference:/Users/MyComp/.nuget/packages/system.collections.concurrent/4.3.0/ref/netstandard1.3/System.Collections.Concurrent.dll /reference:/Users/MyComp/.nuget/packages/system.collections/4.3.0/ref/netstandard1.3/System.Collections.dll /reference:/Users/MyComp/.nuget/packages/system.console/4.3.0/ref/netstandard1.3/System.Console.dll /reference:/Users/MyComp/.nuget/packages/system.diagnostics.debug/4.3.0/ref/netstandard1.3/System.Diagnostics.Debug.dll /reference:/Users/MyComp/.nuget/packages/system.diagnostics.tools/4.3.0/ref/netstandard1.0/System.Diagnostics.Tools.dll /reference:/Users/MyComp/.nuget/packages/system.diagnostics.tracing/4.3.0/ref/netstandard1.5/System.Diagnostics.Tracing.dll /reference:/Users/MyComp/.nuget/packages/system.dynamic.runtime/4.0.11/ref/netstandard1.3/System.Dynamic.Runtime.dll /reference:/Users/MyComp/.nuget/packages/system.globalization.calendars/4.3.0/ref/netstandard1.3/System.Globalization.Calendars.dll /reference:/Users/MyComp/.nuget/packages/system.globalization/4.3.0/ref/netstandard1.3/System.Globalization.dll /reference:/Users/MyComp/.nuget/packages/system.io.compression/4.3.0/ref/netstandard1.3/System.IO.Compression.dll /reference:/Users/MyComp/.nuget/packages/system.io.compression.zipfile/4.3.0/ref/netstandard1.3/System.IO.Compression.ZipFile.dll /reference:/Users/MyComp/.nuget/packages/system.io/4.3.0/ref/netstandard1.5/System.IO.dll /reference:/Users/MyComp/.nuget/packages/system.io.filesystem/4.3.0/ref/netstandard1.3/System.IO.FileSystem.dll /reference:/Users/MyComp/.nuget/packages/system.io.filesystem.primitives/4.3.0/ref/netstandard1.3/System.IO.FileSystem.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.linq/4.3.0/ref/netstandard1.6/System.Linq.dll /reference:/Users/MyComp/.nuget/packages/system.linq.expressions/4.3.0/ref/netstandard1.6/System.Linq.Expressions.dll /reference:/Users/MyComp/.nuget/packages/system.net.http/4.3.0/ref/netstandard1.3/System.Net.Http.dll /reference:/Users/MyComp/.nuget/packages/system.net.primitives/4.3.0/ref/netstandard1.3/System.Net.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.net.sockets/4.3.0/ref/netstandard1.3/System.Net.Sockets.dll /reference:/Users/MyComp/.nuget/packages/system.objectmodel/4.3.0/ref/netstandard1.3/System.ObjectModel.dll /reference:/Users/MyComp/.nuget/packages/system.reflection/4.3.0/ref/netstandard1.5/System.Reflection.dll /reference:/Users/MyComp/.nuget/packages/system.reflection.extensions/4.3.0/ref/netstandard1.0/System.Reflection.Extensions.dll /reference:/Users/MyComp/.nuget/packages/system.reflection.primitives/4.3.0/ref/netstandard1.0/System.Reflection.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.resources.resourcemanager/4.3.0/ref/netstandard1.0/System.Resources.ResourceManager.dll /reference:/Users/MyComp/.nuget/packages/system.runtime/4.3.0/ref/netstandard1.5/System.Runtime.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.extensions/4.3.0/ref/netstandard1.5/System.Runtime.Extensions.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.handles/4.3.0/ref/netstandard1.3/System.Runtime.Handles.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.interopservices/4.3.0/ref/netstandard1.5/System.Runtime.InteropServices.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.interopservices.runtimeinformation/4.3.0/ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.numerics/4.3.0/ref/netstandard1.1/System.Runtime.Numerics.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.serialization.primitives/4.1.1/ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.algorithms/4.3.0/ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.encoding/4.3.0/ref/netstandard1.3/System.Security.Cryptography.Encoding.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.primitives/4.3.0/ref/netstandard1.3/System.Security.Cryptography.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.x509certificates/4.3.0/ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll /reference:/Users/MyComp/.nuget/packages/system.text.encoding/4.3.0/ref/netstandard1.3/System.Text.Encoding.dll /reference:/Users/MyComp/.nuget/packages/system.text.encoding.extensions/4.3.0/ref/netstandard1.3/System.Text.Encoding.Extensions.dll /reference:/Users/MyComp/.nuget/packages/system.text.regularexpressions/4.3.0/ref/netstandard1.6/System.Text.RegularExpressions.dll /reference:/Users/MyComp/.nuget/packages/system.threading/4.3.0/ref/netstandard1.3/System.Threading.dll /reference:/Users/MyComp/.nuget/packages/system.threading.tasks/4.3.0/ref/netstandard1.3/System.Threading.Tasks.dll /reference:/Users/MyComp/.nuget/packages/system.threading.timer/4.3.0/ref/netstandard1.2/System.Threading.Timer.dll /reference:/Users/MyComp/.nuget/packages/system.xml.readerwriter/4.3.0/ref/netstandard1.3/System.Xml.ReaderWriter.dll /reference:/Users/MyComp/.nuget/packages/system.xml.xdocument/4.3.0/ref/netstandard1.3/System.Xml.XDocument.dll /reference:/Users/MyComp/.nuget/packages/validation/2.4.18/lib/netstandard1.3/Validation.dll /reference:/Users/MyComp/.nuget/packages/xamarin.auth/1.6.0.1/lib/netstandard1.6/Xamarin.Auth.dll /reference:/Users/MyComp/.nuget/packages/xamarin.forms/2.5.0.280555/lib/netstandard1.0/Xamarin.Forms.Core.dll /reference:/Users/MyComp/.nuget/packages/xamarin.forms/2.5.0.280555/lib/netstandard1.0/Xamarin.Forms.Platform.dll /reference:/Users/MyComp/.nuget/packages/xamarin.forms/2.5.0.280555/lib/netstandard1.0/Xamarin.Forms.Xaml.dll /debug- /debug:portable /filealign:512 /nologo /optimize+ /out:obj/Release/netstandard2.0/MyProjMobile.dll /target:library /warnaserror- /utf8output /deterministic+ App.xaml.cs Auth/AuthCompletedEvent.cs Auth/AuthenticationState.cs Auth/AuthErrorEvent.cs Auth/AuthExtensions.cs Auth/Constants.cs Auth/MyCompOAuth2Authenticator.cs Data/MyProjUser.cs Data/GoogleUser.cs Data/Grade.cs Data/Role.cs Data/SampleUser.cs Database/AsyncDatabase.cs Database/Database.cs Database/DependencyServiceWrapper.cs Database/IDependencyService.cs Database/ISqLite.cs Model/BaseModel.cs Page/LoginPage.xaml.cs ServicePointConfiguration.cs SSLHttpClient.cs ViewModel/Page/LoginPageViewModel.cs ViewModel/PageModelMapper.cs "/var/folders/dj/zhmtcqbn60xccl1b1lghkdcr0000gn/T/.NETStandard,Version=v2.0.AssemblyAttributes.cs" obj/Release/netstandard2.0/MyProjMobile.AssemblyInfo.cs /warnaserror+:NU1605
App.xaml.cs(35,13): error CS0103: The name 'InitializeComponent' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
Page/LoginPage.xaml.cs(17,4): error CS0103: The name 'InitializeComponent' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(17,13): error CS0103: The name 'ServicePointManager' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(17,52): error CS0103: The name 'SecurityProtocolType' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(18,13): error CS0103: The name 'ServicePointManager' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(9,68): error CS0012: The type 'HttpClientHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(9,73): error CS1503: Argument 1: cannot convert from 'ModernHttpClient.NativeMessageHandler' to 'System.Net.Http.HttpMessageHandler' [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(37,61): error CS1061: 'X509Certificate' does not contain a definition for 'GetPublicKeyString' and no extension method 'GetPublicKeyString' accepting a first argument of type 'X509Certificate' could be found (are you missing a using directive or an assembly reference?) [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(15,74): error CS0012: The type 'HttpClientHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(15,74): error CS0117: 'NativeMessageHandler' does not contain a definition for 'Credentials' [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(15,13): error CS0012: The type 'HttpClientHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
Done Building Project "/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj" (restore;build target(s)) -- FAILED.

Build FAILED.
Tagged:
Sign In or Register to comment.