Bug 24325 - Custom renderers assembly does not load at startup.
Summary: Custom renderers assembly does not load at startup.
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-07 03:37 UTC by Max
Modified: 2016-03-25 18:13 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 INVALID

Description Max 2014-11-07 03:37:24 UTC
We working on Xamarin.Forms component. The project contains shared library and
platform-dependent libraries with registered custom renderers. But then you
link this assemblies in final application project these renderers not created
at startup because of platform assembly not loaded. We create method similar to
Forms.Init() as workaround, but it looks ugly and easy to forget. Our method do
nothing and used only to load assembly. Another strange thing that
AppDomain.CurrentDomain.GetAssemblies(); contains our platform assembly, so its
completely unclear why Forms cant load it correctly if its contains
Export***Attribute.

** Expected Behaviour **

Xamarin.Forms should load platform assemblies automatically, especially for
external components.

** Actual Behaviour **

We create empty method as workaround.
Comment 1 Parmendra Kumar 2014-12-31 13:28:20 UTC
I have tried to reproduce to this issue but I am not able to reproduce this issue. I have followed steps mentioned in the bug description. Please check the screencast and let me know if I have missed anything. 
Could you Please provide us sample project,steps, environment info. So that we can reproduce this issue at our end.

Screencast for the same: http://www.screencast.com/t/eQPlj8RrORvI

Environment info:

Xamarin Studio  5.5.4 (build 15)
Mono 3.10.0 ((detached/92c4884)
Xamarin.Android : 4.20.0.28 (Business Edition)
Xcode 5.1.1 (5085)
Xamarin.iOS  8.4.0.47 (Business Edition)
Xamarin.Mac : 1.10.0.18 (Business Edition)
Mac OS X 10.9.5
Comment 2 Jason Smith [MSFT] 2016-03-25 18:13:00 UTC
Your renderers are being removed by the linker and never loaded, you need to form a hard reference from your application to the library, usually done via an init call.