Bug 16618 - PCL assemblies are not recognized correctly as SDK assemblies in "link SDK assemblies" mode
Summary: PCL assemblies are not recognized correctly as SDK assemblies in "link SDK as...
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.18.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2013-12-05 10:06 UTC by Jérémie Laval
Modified: 2016-11-11 09:52 UTC (History)
4 users (show)

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

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 FIXED

Description Jérémie Laval 2013-12-05 10:06:51 UTC
Code is in https://github.com/garuma/Moyeu
PCL library referenced (profile 78): https://github.com/garuma/MobileHtmlAgilityPack

The assemblies/ output of an APK with "Link SDK assemblies":

total 15088
2104 -rwxr-xr-x  1 jeremie  staff   1.0M Dec  5 00:29 GooglePlayServicesLib.dll*
 168 -rwxr-xr-x  1 jeremie  staff    82K Dec  5 00:35 MobileHtmlAgilityPack.dll*
2080 -rwxr-xr-x  1 jeremie  staff   1.0M Dec  5 00:38 Mono.Android.dll*
 352 -rwxr-xr-x  1 jeremie  staff   176K Dec  5 00:38 Mono.Security.dll*
 200 -rwxr-xr-x  1 jeremie  staff   100K Dec  5 00:35 Moyeu.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.5K Nov 12 08:05 System.Collections.Concurrent.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Collections.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.5K Nov 12 08:05 System.ComponentModel.Annotations.dll*
 536 -rwxr-xr-x  1 jeremie  staff   267K Nov 12 08:05 System.ComponentModel.Composition.dll*
 112 -rwxr-xr-x  1 jeremie  staff    56K Nov 12 08:05 System.ComponentModel.DataAnnotations.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.ComponentModel.EventBasedAsync.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.ComponentModel.dll*
 736 -rwxr-xr-x  1 jeremie  staff   366K Dec  5 00:38 System.Core.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Diagnostics.Contracts.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Diagnostics.Debug.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Diagnostics.Tools.dll*
  16 -rwxr-xr-x  1 jeremie  staff   6.0K Nov 12 08:05 System.Dynamic.Runtime.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Globalization.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.IO.dll*
  16 -rwxr-xr-x  1 jeremie  staff   6.5K Nov 12 08:05 System.Linq.Expressions.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Linq.Parallel.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Linq.Queryable.dll*
  16 -rwxr-xr-x  1 jeremie  staff   6.0K Nov 12 08:05 System.Linq.dll*
 224 -rwxr-xr-x  1 jeremie  staff   110K Nov 12 08:05 System.Net.Http.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Net.NetworkInformation.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Net.Primitives.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Net.Requests.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.ObjectModel.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Reflection.Emit.ILGeneration.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Reflection.Emit.Lightweight.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Reflection.Emit.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Reflection.Extensions.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Reflection.Primitives.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Reflection.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Resources.ResourceManager.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Runtime.Extensions.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.5K Nov 12 08:05 System.Runtime.InteropServices.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Dec  5 00:38 System.Runtime.Numerics.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Dec  5 00:38 System.Runtime.Serialization.Json.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Dec  5 00:38 System.Runtime.Serialization.Primitives.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Dec  5 00:38 System.Runtime.Serialization.Xml.dll*
  24 -rwxr-xr-x  1 jeremie  staff    12K Nov 12 08:05 System.Runtime.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Security.Principal.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Dec  5 00:38 System.ServiceModel.Http.dll*
  24 -rwxr-xr-x  1 jeremie  staff    10K Dec  5 00:38 System.ServiceModel.Primitives.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Text.Encoding.Extensions.dll*
   8 -rwxr-xr-x  1 jeremie  staff   4.0K Nov 12 08:05 System.Text.Encoding.dll*
  16 -rwxr-xr-x  1 jeremie  staff   4.5K Nov 12 08:05 System.Text.RegularExpressions.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.5K Nov 12 08:05 System.Threading.Tasks.Parallel.dll*
  16 -rwxr-xr-x  1 jeremie  staff   6.0K Nov 12 08:05 System.Threading.Tasks.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Threading.dll*
  72 -rwxr-xr-x  1 jeremie  staff    36K Dec  5 00:38 System.Xml.Linq.dll*
  16 -rwxr-xr-x  1 jeremie  staff   6.5K Nov 12 08:05 System.Xml.ReaderWriter.dll*
  16 -rwxr-xr-x  1 jeremie  staff   6.0K Nov 12 08:05 System.Xml.XDocument.dll*
  16 -rwxr-xr-x  1 jeremie  staff   5.0K Nov 12 08:05 System.Xml.XmlSerializer.dll*
1184 -rwxr-xr-x  1 jeremie  staff   589K Dec  5 00:38 System.Xml.dll*
1032 -rwxr-xr-x  1 jeremie  staff   514K Dec  5 00:38 System.dll*
  88 -rwxr-xr-x  1 jeremie  staff    43K Dec  5 00:38 XamSvg.dll*
2752 -rwxr-xr-x  1 jeremie  staff   1.3M Dec  5 00:30 Xamarin.Android.Support.v4.dll*
   0 -rw-r--r--  1 jeremie  staff     0B Dec  5 10:02 foo
2784 -rwxr-xr-x  1 jeremie  staff   1.4M Dec  5 00:38 mscorlib.dll*


The same output (expected for this case and normally in a similar way for the one above) for "Link all assemblies":

total 8472
 456 -rwxr-xr-x  1 jeremie  staff   226K Dec  5 01:11 GooglePlayServicesLib.dll*
  80 -rwxr-xr-x  1 jeremie  staff    37K Dec  5 01:11 MobileHtmlAgilityPack.dll*
1824 -rwxr-xr-x  1 jeremie  staff   910K Dec  5 01:11 Mono.Android.dll*
 352 -rwxr-xr-x  1 jeremie  staff   176K Dec  5 01:11 Mono.Security.dll*
 200 -rwxr-xr-x  1 jeremie  staff   100K Dec  5 01:05 Moyeu.dll*
 104 -rwxr-xr-x  1 jeremie  staff    49K Dec  5 01:11 System.Core.dll*
 144 -rwxr-xr-x  1 jeremie  staff    71K Dec  5 01:11 System.Net.Http.dll*
  72 -rwxr-xr-x  1 jeremie  staff    36K Dec  5 01:11 System.Xml.Linq.dll*
1184 -rwxr-xr-x  1 jeremie  staff   589K Dec  5 01:11 System.Xml.dll*
 984 -rwxr-xr-x  1 jeremie  staff   489K Dec  5 01:11 System.dll*
  80 -rwxr-xr-x  1 jeremie  staff    37K Dec  5 01:11 XamSvg.dll*
 328 -rwxr-xr-x  1 jeremie  staff   164K Dec  5 01:11 Xamarin.Android.Support.v4.dll*
2664 -rwxr-xr-x  1 jeremie  staff   1.3M Dec  5 01:11 mscorlib.dll*



=== Xamarin Studio ===

Version 4.2.2 (build 2)
Installation UUID: 9f043368-f776-409e-8ffd-efbda48219aa
Runtime:
	Mono 3.2.5 ((no/964e8f0)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302050000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.Mac ===

Xamarin.Mac: 1.2.36

=== Xamarin.iOS ===

Version: 7.0.4.209 (Business Edition)
Hash: 23a0827
Branch: 
Build date: 2013-11-11 16:04:00-0500

=== Xamarin.Android ===

Version: 4.10.1 (Business Edition)
Android SDK: /Users/jeremie/mono/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 402020002
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Build date: 2013-11-19 15:35:40+0000
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80

=== Operating System ===

Mac OS X 10.9.0
Darwin phoenix 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 1 Martin Baulig 2013-12-05 11:10:38 UTC
Sebastien, if I remember correctly, then you have previously fixed a similar issue in iOS (the assemblies were not signed properly?).  Could you please have a look at this?
Comment 3 Alex Rønne Petersen 2013-12-08 13:03:46 UTC
I think this is in Martin's ballpark if it doesn't involve changing the linker. Let me know if the SDK list in the linker needs changes.
Comment 4 Jonathan Pryor 2014-07-28 18:15:13 UTC
Is this still a problem?
Comment 5 Atsushi Eno 2014-10-09 07:40:32 UTC
Not sure if it is related (I think it is) but now PCL-referencing app fails to even build (tested with Forms empty app):

/svn/monodroid/monodroid/out/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task GenerateJavaStubs: Could not load assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile? (FormsTest4.Android)
Comment 6 Martin Baulig 2016-11-11 09:52:27 UTC
Closing ancient bugs, please reopen if you're still having this problem.