I upgraded my standalone PCL library to use .Net Standard 2.0
. Now I tried to built on Mac and I get the following error:
XamlC:
Compiling Xaml, assembly: obj/Release/netstandard2.0/MyLibrary.dll
"obj/Release/netstandard2.0/XamlC.stamp" wird erstellt, da "AlwaysCreate" angegeben wurde.
GenerateSatelliteAssemblies:
Das Verzeichnis "obj/Release/netstandard2.0/de" wird erstellt.
/Library/Frameworks/Mono.framework/Versions/5.18.0/lib/mono/4.5/al.exe /culture:de /out:obj/Release/netstandard2.0/de/MyLibrary.resources.dll /template:obj/Release/netstandard2.0/MyLibrary.dll /embed:obj/Release/netstandard2.0/MyLibrary.Common.Localization.LibResources.de.resources
/usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: Unerwarteter Fehler bei der GenerateDepsFile-Aufgabe. [/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary/MyLibrary.csproj]
/usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: System.TypeLoadException: Could not load type of field 'Microsoft.NET.Build.Tasks.DependencyContextBuilder:_filteredPackages' (12) due to: Could not resolve type with token 01000025 from typeref (expected class 'NuGet.Packaging.Core.PackageIdentity' in assembly 'NuGet.Packaging, Version=5.1.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35') assembly:NuGet.Packaging, Version=5.1.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35 type:NuGet.Packaging.Core.PackageIdentity member:(null) [/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary/MyLibrary.csproj]
/usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x00000] in <a7945d89c0ac41f8a1c76203a2991e34>:0 [/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary/MyLibrary.csproj]
/usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 [/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary/MyLibrary.csproj]
/usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 [/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary/MyLibrary.csproj]
Die Erstellung des Projekts "/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary/MyLibrary.csproj" ist abgeschlossen (Standardziele) -- FEHLER.
Die Erstellung des Projekts "/Users/someuser/.jenkins/workspace/MyLibrary/MyLibrary.sln" ist abgeschlossen, Build Ziel(e) -- FEHLER.
Fehler beim Buildvorgang.
As you can see I'm building with Jenkins
, but this shouldn't be the issue at all (msbuild
is used). The issue seems to be a known issue, but I don't know how I can fix it under the given cirumcstances (using older version of Visual Studio for Mac
). These are the versions used:
=== Visual Studio Community 2017 for Mac ===
Version 7.8.4 (build 1)
Installation UUID: 3d97ef3f-5e3c-496d-bba3-bf410eac83a0
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.0.0.0 ( / b40230c0)
Package version: 518000268
=== Mono Framework MDK ===
Runtime:
Mono 5.18.0.268 (2018-08/68aad3b0eb7) (64-bit)
Package version: 518000268
=== NuGet ===
Version: 4.8.2.5835
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.11
2.1.9
2.1.2
2.1.1
2.0.5
2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.700/Sdks
SDK Versions:
2.1.700
2.1.505
2.1.302
2.1.301
2.1.4
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.10
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 9.3.0.23 (Visual Studio Community)
Android SDK: /Users/someuser/Library/Android/sdk
Supported Android versions:
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.1
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/someuser/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 7.8.1.0
Hash: 8924ea4a
=== Apple Developer Tools ===
Xcode 10.2.1 (14490.122)
Build 10E1001
=== Xamarin.Mac ===
Version: 5.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:48-0400
=== Xamarin.iOS ===
Version: 12.4.0.64 (Visual Studio Community)
Hash: 9c8d8e0a
Branch: xcode10.2
Build date: 2019-03-27 06:24:31-0400
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 708040001
Git revision: 9e1629d19c3f9f6d11a5d9895993a8edf1e7a3aa
Build date: 2019-05-10 19:37:45+00
Build branch: release-7.8
Xamarin extensions: c3cb4059acaf9142b2a5c176866edfc4c32b7da2
=== Operating System ===
Mac OS X 10.14.6
Darwin 18.7.0 Darwin Kernel Version 18.7.0
Thu Jun 20 18:42:21 PDT 2019
root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
What steps should I do to get the build working again? Other than updating to Visual Studio 2019 for Mac
(v. 8+)? Would it be enough to upgrade to a newer Mono version (which one?)? Would that still work with my setup?