Forum Xamarin.Mac
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error MSB4018: The "ResolvePackageAssets" task failed unexpectedly.

AllanChin.6924AllanChin.6924 USUniversity ✭✭✭

Suddenly, building on Visual Studio for Mac 8.3.11 (build 1) on MacOS 10.12 is giving me this error. Please help me me resolve this as soon as possible. Thanks.

/usr/local/share/dotnet/sdk/3.1.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(5,5): Error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. System.MissingFieldException: Field not found: string NuGet.ProjectModel.LockFileItem.AliasesProperty Due to: Could not find field in class at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteItems[T] (NuGet.ProjectModel.LockFileTarget target, System.Func2[T,TResult] getAssets, System.Func2[T,TResult] filter, System.Action`2[T1,T2] writeMetadata) [0x000bd] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteCompileTimeAssemblies () [0x00000] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteItemGroup (System.Action writeItems) [0x0000e] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteItemGroups () [0x00024] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.Write () [0x00006] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheWriter.WriteToCacheFile () [0x00040] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) [0x00049] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) [0x00015] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () [0x00000] in :0 at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () [0x00018] in :0 at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x0002e] in :0 at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:575 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/2020-02/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:818 (MSB4018) (HP.ChimeraSwaggerServices)​

Here is my dev environment.

=== Visual Studio Community 2019 for Mac === Version 8.3.11 (build 1) Installation UUID: 7d2ef590-dcc9-4e7d-86ec-7c2718e40aea GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 5.16.1.24 (d16-3 / 08809f5b) Package version: 612000090 === Mono Framework MDK === Runtime: Mono 6.12.0.90 (2020-02/d3daacdaa80) (64-bit) Package version: 612000090 === NuGet === Version: 5.3.0.6192 === .NET Core SDK === SDK: /usr/local/share/dotnet/sdk/3.1.401/Sdks SDK Version: 3.1.401 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks === .NET Core Runtime === Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 3.1.7 3.1.5 2.1.21 2.1.11 === Xamarin.Profiler === Version: 1.6.15.68 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler === Updater === Version: 11 === Xamarin.Android === Not Installed === Microsoft Mobile OpenJDK === Java SDK: Not Found Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL === Android SDK Manager === Version: 1.4.0.65 Hash: c33b107 Branch: remotes/origin/d16-3 Build date: 2019-11-19 20:33:22 UTC === Android Device Manager === Version: 1.2.0.116 Hash: d2b2af0 Branch: remotes/origin/d16-3 Build date: 2019-11-19 20:33:42 UTC === Apple Developer Tools === Xcode 9.2 (13772) Build 9C40b === Xamarin.Mac === Version: 6.20.2.2 (Visual Studio Community) Hash: 817b6f72a Branch: d16-7 Build date: 2020-07-18 18:44:59-0400 === Xamarin.iOS === Xamarin.iOS not installed. Can't find mtouch or the Version file at /Library/Frameworks/Xamarin.iOS.framework/Versions/Current. === Xamarin Designer === Version: 16.3.0.256 Hash: 8a223bfd7 Branch: remotes/origin/d16-3 Build date: 2019-11-01 21:02:02 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: 803110001 Git revision: 6ee6ad2ec46ae5a08a1999ee4c815ac656a35b91 Build date: 2019-12-05 16:09:27+00 Build branch: release-8.3 Xamarin extensions: 56bd70ef2e327f71c615cfc29a47fd50685fadcb === Operating System === Mac OS X 10.12.6 Darwin 16.7.0 Darwin Kernel Version 16.7.0 Sun Jun 2 20:26:31 PDT 2019 root:xnu-3789.73.50~1/RELEASE_X86_64 x86_64

Best Answer

Answers

Sign In or Register to comment.