Xamarin Build failed maybe nuget issue?

We don’t run builds since last year and we starting to do it again, but we didn’t change master and now always fails, not sure if we missing something but we always get this error:

/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: The “ResolvePackageDependencies” task failed unexpectedly. [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: System.MissingMethodException: Method not found: System.Collections.Generic.IList`1<NuGet.Packaging.Core.PackageDependency> NuGet.ProjectModel.LockFileTargetLibrary.get_Dependencies() [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.GetPackageAndFileDependencies (NuGet.ProjectModel.LockFileTarget target) [0x0011f] in <1c9337b474d648df926796c0a09d53ce>:0 [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.RaiseLockFileTargets () [0x000a6] in <1c9337b474d648df926796c0a09d53ce>:0 [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.ExecuteCore () [0x00006] in <1c9337b474d648df926796c0a09d53ce>:0 [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x00000] in <1c9337b474d648df926796c0a09d53ce>:0 [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in :0 [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
/Users/vagrant/.dotnet/sdk/2.1.200/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(172,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) [0x002a9] in :0 [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
Build continuing because “ContinueOnError” on the task “ResolvePackageDependencies” is set to “ErrorAndContinue”.
_HandlePackageFileConflicts:
Encountered conflict between ‘Reference:System.Data’ and ‘Reference:/Users/vagrant/.nuget/packages/netstandard.library/2.0.1/build/netstandard2.0/ref/System.Data.dll’. Could not determine winner because ‘Reference:System.Data’ does not exist.
ResolveAssemblyReferences:
Primary reference “System.Data”.
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2134,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “System.Data”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]
For SearchPath “{HintPathFromItem}”.
Considered “…/…/…/…/…/…/…/Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll”, but it didn’t exist.
For SearchPath “{RawFileName}”.
Considered treating “System.Data” as a file name, but it didn’t exist.
There was a conflict between “System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089” and “System.Data”.
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2134,5): warning MSB3243: No way to resolve conflict between “System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089” and “System.Data”. Choosing “System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089” arbitrarily. [/Users/vagrant/git/Freesat/Metaphor.Shared/Metaphor.Shared.csproj]

After this nothing works and we have 600+ errors, running the MSBuild locally all works just fine or doing Xamarin Archive (tested internally more than one computer) can someone help?

Best,
Emanuel

1 Like

Found the issue changed the .NET Core version to 2.2.300 (had 2.1.100) and this issue got fixed, thanks anyway

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.