Bug 54145 - Building nuget got : error MSB4018: This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER.
Summary: Building nuget got : error MSB4018: This is an unhandled exception from a tas...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.2 (15.1)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-03-28 17:39 UTC by James Moore
Modified: 2017-10-13 17:52 UTC (History)
5 users (show)

Tags: 15.1I
Is this bug a regression?: ---
Last known good build:


Attachments
Sample (25.67 KB, application/zip)
2017-07-13 21:57 UTC, Cody Beyer (MSFT)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description James Moore 2017-03-28 17:39:04 UTC
Create a nuget project using the multiplatform library wizard; new solution -> Multiplatform > Library > implementation platform specific.

Add a .so with areambi code to the Android project.  (Don't care what's in that .so, as long as it's valid code. We're not going to get anywhere near the point we can actually run anything from it.)

Mark it as EmbeddedNativeLibrary.

Build the nuget, get a nice exception telling me I need to file a bug : "PLEASE OPEN A BUG AGAINST THE TASK OWNER."


Building: Test6.NuGet (Debug)
Build started 3/28/2017 10:18:11 AM.
__________________________________________________
Project "/Users/james/Projects/Test6/Test6.Android/Test6.Android.csproj" (Build target(s)):

Target _SetLatestTargetFrameworkVersion:
     Found Android SDK. API levels: 21, 23, 24, 25
Target _ResolveMonoAndroidSdks:
    MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/
    MonoAndroid Binaries: /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/
    Android Platform API level: 25
    TargetFrameworkVersion: v7.1
    Android NDK: /Users/james/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/
    Android SDK: /Users/james/Library/Developer/Xamarin/android-sdk-mac_x86/
    Android SDK Build Tools: /Users/james/Library/Developer/Xamarin/android-sdk-mac_x86/build-tools/25.0.2/
    Java SDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/
Target _GetPrimaryCpuAbi:
    _PrimaryCpuAbi=
Target _CheckInstantRunCondition:
    Dex Fast Deployment Enabled: False
Target _SetupInstantRun:
    Android Java Class for Fast Deployment: 
Target _SetupApplicationJavaClass:
    Application Java class: android.app.Application
Target _ValidateAndroidPackageProperties:
      PackageName: Test6.Test6
Target _GenerateAndroidAssetsDir:
  Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.
Target _CreateAdditionalResourceCache:
  Skipping target "_CreateAdditionalResourceCache" because it has no outputs.
Target _GenerateAndroidResourceDir:
  Skipping target "_GenerateAndroidResourceDir" because it has no outputs.
Target _DefineBuildTargetAbis:
    Build target ABI: arm64-v8a;armeabi;armeabi-v7a;x86;x86_64
Target _CreateNativeLibraryArchive:
    libxamarin_support.so : warning XA4300: Native library 'libxamarin_support.so' will not be bundled because it has an unsupported ABI.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: The "CreateNativeLibraryArchive" task failed unexpectedly.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: System.IO.FileNotFoundException: /Users/james/Projects/Test6/Test6.Android/obj/Debug/__AndroidNativeLibraries__.zip.new does not exist
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: File name: '/Users/james/Projects/Test6/Test6.Android/obj/Debug/__AndroidNativeLibraries__.zip.new'
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x001bd] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:109 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Xamarin.Android.Tools.Files.CopyIfZipChanged (System.String source, System.String destination) [0x0001c] in <835bcdb426594890a760abb77b15c9d2>:0 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Xamarin.Android.Tools.Files.ArchiveZip (System.String target, System.Action`1[T] archiver) [0x00014] in <835bcdb426594890a760abb77b15c9d2>:0 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Xamarin.Android.Tasks.CreateNativeLibraryArchive.Execute () [0x00159] in <835bcdb426594890a760abb77b15c9d2>:0 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x0002a] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/XMakeBuildEngine/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632 
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x002bf] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/XMakeBuildEngine/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787 
Done building target "_CreateNativeLibraryArchive" in project "Test6.Android.csproj" -- FAILED.

Done building project "Test6.Android.csproj" -- FAILED.

Build FAILED.

libxamarin_support.so : warning XA4300: Native library 'libxamarin_support.so' will not be bundled because it has an unsupported ABI.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: The "CreateNativeLibraryArchive" task failed unexpectedly.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: System.IO.FileNotFoundException: /Users/james/Projects/Test6/Test6.Android/obj/Debug/__AndroidNativeLibraries__.zip.new does not exist
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018: File name: '/Users/james/Projects/Test6/Test6.Android/obj/Debug/__AndroidNativeLibraries__.zip.new'
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x001bd] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:109 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Xamarin.Android.Tools.Files.CopyIfZipChanged (System.String source, System.String destination) [0x0001c] in <835bcdb426594890a760abb77b15c9d2>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Xamarin.Android.Tools.Files.ArchiveZip (System.String target, System.Action`1[T] archiver) [0x00014] in <835bcdb426594890a760abb77b15c9d2>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Xamarin.Android.Tasks.CreateNativeLibraryArchive.Execute () [0x00159] in <835bcdb426594890a760abb77b15c9d2>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x0002a] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/XMakeBuildEngine/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1154,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x002bf] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/XMakeBuildEngine/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787 
    1 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.55
Build started 3/28/2017 10:18:12 AM.
__________________________________________________
Project "/Users/james/Projects/Test6/Test6.iOS/Test6.iOS.csproj" (Build target(s)):

Target _DetectAppManifest:
    FindItemWithLogicalName Task
      Items:
        packages.config
      LogicalName: Info.plist
      ProjectDir: /Users/james/Projects/Test6/Test6.iOS
      ResourcePrefix: Resources
Target _DetectSdkLocations:
    DetectSdkLocations Task
      TargetFrameworkIdentifier: Xamarin.iOS
      TargetArchitectures: <null>
      SdkVersion: 10.2
      XamarinSdkRoot: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current
      SdkRoot: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk
      SdkDevPath: /Applications/Xcode.app/Contents/Developer
      SdkUsrPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr
      SdkPlatform: iPhoneOS
      SdkIsSimulator: False
Target _BeforeCoreCompileInterfaceDefinitions:
  Skipping target "_BeforeCoreCompileInterfaceDefinitions" because it has no inputs.
Target _BeforeCoreCompileInterfaceDefinitions:
  Skipping target "_BeforeCoreCompileInterfaceDefinitions" because it has no inputs.
Target _BeforeCoreCompileInterfaceDefinitions:
  Skipping target "_BeforeCoreCompileInterfaceDefinitions" because it has no inputs.
Target _CoreCompileInterfaceDefinitions:
  Skipping target "_CoreCompileInterfaceDefinitions" because it has no inputs.
Target _BeforeCoreCompileImageAssets:
  Skipping target "_BeforeCoreCompileImageAssets" because it has no inputs.
Target _BeforeCoreCompileImageAssets:
  Skipping target "_BeforeCoreCompileImageAssets" because it has no inputs.
Target _BeforeCoreCompileImageAssets:
  Skipping target "_BeforeCoreCompileImageAssets" because it has no inputs.
Target _CoreCompileImageAssets:
  Skipping target "_CoreCompileImageAssets" because it has no inputs.
Target _BeforeCoreCompileSceneKitAssets:
  Skipping target "_BeforeCoreCompileSceneKitAssets" because it has no inputs.
Target _BeforeCoreCompileSceneKitAssets:
  Skipping target "_BeforeCoreCompileSceneKitAssets" because it has no inputs.
Target _BeforeCoreCompileSceneKitAssets:
  Skipping target "_BeforeCoreCompileSceneKitAssets" because it has no inputs.
Target _CoreCompileSceneKitAssets:
  Skipping target "_CoreCompileSceneKitAssets" because it has no inputs.
Target _BeforeCompileTextureAtlases:
  Skipping target "_BeforeCompileTextureAtlases" because it has no inputs.
Target _BeforeCompileTextureAtlases:
  Skipping target "_BeforeCompileTextureAtlases" because it has no inputs.
Target _BeforeCompileTextureAtlases:
  Skipping target "_BeforeCompileTextureAtlases" because it has no inputs.
Target _CoreCompileTextureAtlases:
  Skipping target "_CoreCompileTextureAtlases" because it has no inputs.
Target _CollectBundleResources:
    CollectBundleResources Task
      BundleResources: <null>
      OptimizePropertyLists: True
      OptimizePNGs: True
      ProjectDir: /Users/james/Projects/Test6/Test6.iOS
      ResourcePrefix: Resources
Target _CoreOptimizePngImages:
  Skipping target "_CoreOptimizePngImages" because it has no outputs.
Target _CoreOptimizePropertyLists:
  Skipping target "_CoreOptimizePropertyLists" because it has no inputs.
Target _CoreOptimizeLocalizationFiles:
  Skipping target "_CoreOptimizeLocalizationFiles" because it has no inputs.
Target _PackLibraryResources:
    PackLibraryResources Task
      BundleResourcesWithLogicalNames: <null>
      Prefix: monotouch
Target GenerateTargetFrameworkMonikerAttribute:
  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CoreCompile:
  Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
Target CopyFilesToOutputDirectory:
    Test6.iOS -> /Users/james/Projects/Test6/Test6.iOS/bin/Debug/Test6.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.45

---------------------- Done ----------------------

Build: 1 error, 1 warning
Comment 1 James Moore 2017-03-28 17:39:22 UTC
=== Xamarin Studio Professional ===

Version 6.3 (build 834)
Installation UUID: 6dc077b1-7f04-4c1c-b481-1dcbb9a8b0a1
Runtime:
	Mono 4.8.0 (mono-4.8.0-branch/8f6d0f6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000520

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

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

=== Xamarin.Android ===

Version: 7.2.0.2 (Visual Studio Professional)
Android SDK: /Users/james/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		5.0 (API level 21)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.3.1
SDK Platform Tools Version: 25.0.4
SDK Build Tools Version: 25.0.2

Java SDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.Mac ===

Version: 3.2.0.20 (Visual Studio Professional)

=== Xamarin Inspector ===

Version: 1.2.0
Hash: 62c17e6
Branch: d15-1
Build date: Mon, 20 Mar 2017 02:36:23 GMT

=== Xamarin.iOS ===

Version: 10.8.0.20 (Visual Studio Professional)
Hash: f94cf26
Branch: d15-1
Build date: 2017-03-14 12:37:51-0400

=== Build Information ===

Release ID: 603000834
Git revision: bb1dff522ee38d9963b4d97f6cfa0f92c85e8ecb
Build date: 2017-03-14 13:38:37-04
Xamarin addins: 8aac7919dc66c1ce0d9d75fe150ddc1ab15fd941
Build lane: monodevelop-lion-d15-1

=== Operating System ===

Mac OS X 10.12.3
Darwin retina.restphone.com 16.4.0 Darwin Kernel Version 16.4.0
    Thu Dec 22 22:53:21 PST 2016
    root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
Comment 2 Al Clark [MSFT] 2017-04-21 10:49:33 UTC
Could you please share a repo that exhibits the issue?
Comment 3 James Moore 2017-07-11 23:24:47 UTC
The first line of the bug tells you how to create it:

Create a nuget project using the multiplatform library wizard; new solution -> Multiplatform > Library > implementation platform specific.
Comment 4 Cody Beyer (MSFT) 2017-07-13 21:57:32 UTC
James, 

I followed this steps in the latest VS Mac with latest Android, and it does not occur. Attached is my sample.
Comment 5 Cody Beyer (MSFT) 2017-07-13 21:57:56 UTC
Created attachment 23543 [details]
Sample
Comment 6 Jon Douglas [MSFT] 2017-10-13 17:52:08 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!