Skip to content

MissingMethodException for NuGet API call in ResolvePackageAssets #3402

@suihanhbr

Description

@suihanhbr

Issue Title

When I clean the project , I get the error. This error occurs on .net core 3 preview 6/7/8/9/rc1 . There is the complete log :

/usr/local/share/dotnet/sdk/3.0.100-rc1-014190/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(5,5): Error MSB4018: The "ResolvePackageAssets" task failed unexpectedly.
System.MissingMethodException: Method not found: System.Collections.Generic.IList`1 NuGet.ProjectModel.LockFileTargetLibrary.get_FrameworkReferences()
at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteItemGroup (System.Action writeItems) [0x0000e] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteItemGroups () [0x0005a] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.Write () [0x00006] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteToCacheFile () [0x00040] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) [0x00049] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) [0x00015] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () [0x00000] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () [0x00018] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x0002e] in <112b02858ad641e5986d71e58e14b82e>:0
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-08/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:573
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 /Users/builder/jenkins/workspace/build-package-osx-mono/2018-08/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:810 (MSB4018) (SuiHanLib)

My IDE Info

=== Visual Studio Community 2019 for Mac (Preview) ===

Version 8.3 Preview (8.3 build 1721)
Installation UUID: 4e60959a-758f-48ce-ae6d-26e15276ea83
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.16.1.24 (d16-3 / 08809f5b)

Package version: 604000194

=== Mono Framework MDK ===

Runtime:
Mono 6.4.0.194 (2019-06/7da9a041b3b) (64-bit)
Package version: 604000194

=== NuGet ===

Version: 5.3.0.6192

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.0.0-rc1-19456-20
3.0.0-preview5-27626-15
SDK: /usr/local/share/dotnet/sdk/3.0.100-rc1-014190/Sdks
SDK Versions:
3.0.100-rc1-014190
3.0.100-preview5-011568
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.11.16
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 10.3 (14492.2)
Build 10G8

=== Xamarin.Mac ===

Version: 5.16.1.24 (Visual Studio Community)
Hash: 08809f5b
Branch: d16-3
Build date: 2019-09-06 08:42:41-0400

=== Xamarin.iOS ===

Version: 12.16.1.24 (Visual Studio Community)
Hash: 08809f5b
Branch: d16-3
Build date: 2019-09-06 08:42:42-0400

=== Xamarin Designer ===

Version: 16.3.0.178
Hash: 725c87d57
Branch: remotes/origin/d16-3
Build date: 2019-08-29 22:57:50 UTC

=== Xamarin.Android ===

Version: 10.0.0.43 (Visual Studio Community)
Commit: xamarin-android/d16-3/8af1ca8
Android SDK: /Users/huangboru/myfile/sdk
Supported Android versions:
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: 29.0.4
SDK Build Tools Version: 29.0.2

Build Information:
Mono: mono/mono@7af64d1ebe9
Java.Interop: xamarin/java.interop/d16-3@5836f58
LibZipSharp: grendello/LibZipSharp/d16-3@71f4a94
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3@cb41333

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/huangboru/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 SDK Manager ===

Version: 1.4.0.64
Hash: f70cfd2
Branch: remotes/origin/d16-3
Build date: 2019-09-02 17:32:00 UTC

=== Android Device Manager ===

Version: 1.2.0.112
Hash: 791e68e
Branch: remotes/origin/d16-3
Build date: 2019-09-02 17:32:26 UTC

=== 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: 803001721
Git revision: 7becf46ed78863f8dc8952fe82f5fed4d3340910
Build date: 2019-09-13 08:22:56+00
Build branch: release-8.3
Xamarin extensions: d8cb9a07c3accd3571fb44f0590806c52f8dda0f

=== Operating System ===

Mac OS X 10.14.6
Darwin 18.7.0 Darwin Kernel Version 18.7.0
Tue Aug 20 16:57:14 PDT 2019
root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

General

Provide details on the problem you are experiencing including the .NET Core version, operating system version and anything else that is relevant.

Please provide a code sample for your issue if it is relevant, either inline, link to a gist (or similar) or add it as a zipped attachment.

For some issues, you will get a quicker and better response if you file it at a more specific .NET repo. For example, if the problem is with ASP.NET Core, you are encouraged to use the aspnet/home repo.

Metadata

Metadata

Assignees

Labels

needs-more-infoNot enough information has been provided. Please share more detail as requested.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions