Bug 45617 - CustomControl not rendered in Release mode
Summary: CustomControl not rendered in Release mode
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-18 09:49 UTC by Dharmendar
Modified: 2017-07-12 22:51 UTC (History)
7 users (show)

Tags: ac uwp .net native
Is this bug a regression?: ---
Last known good build:


Attachments
CustomControl not rendered in Release mode (327.65 KB, application/x-zip-compressed)
2016-10-18 09:52 UTC, Dharmendar
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 for Bug 45617 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Dharmendar 2016-10-18 09:49:30 UTC
In Forms.UWP platform, CustomRenderer in the class library is not triggered in Release mode. We have prepared a sample by created the class library and written a custom renderer for a custom label which is created in the portable class to replicate the issue.Also, we have attached the sample in this report.
Comment 1 Dharmendar 2016-10-18 09:52:00 UTC
Created attachment 18101 [details]
CustomControl not rendered in Release mode
Comment 2 Divakar 2016-11-03 10:01:33 UTC
Hi Team,

As additional info, if we initialize the assemblies used on our app as in below link, the issue is resolved.

https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/#Troubleshooting
Comment 3 Jimmy [MSFT] 2017-02-23 19:15:14 UTC
As mentioned in comment 2, this is due to release builds using the .NET Native tool chain which can remove references from separate assemblies.
Comment 4 Harikrishnan 2017-02-23 21:20:55 UTC
Hi Jimmy,
It was just a workaround that was mentioned in Comment 2 and it cannot be a valid answer. 

I could see that most often, just a workaround is given for issues and the bug is marked as ResolvedAnswered. 

How can a workaround become a fix? When will this be fixed internally in Xamarin? It is not possible to add the List of assemblies to include in the UWP project whenever you create a new project. 

It was working fine in earlier versions of Xamarin. It is supposed to be fixed in Xamarin source itself.
Comment 5 Dinesh 2017-02-24 05:02:22 UTC
Hi Xamarin Team,

Can you please provide any solution regarding this. And can you let me know how can a workaround become a fix?. Whenever we create a new project whether we need to add the List of assemblies.

Regards,
Dinesh B
Comment 6 Jimmy [MSFT] 2017-02-24 17:42:35 UTC
Hi Harikrishnan, 

Do you know what version of Xamarin.Forms this previously worked on without issue? If it is a regression, we would definitely want to look into it so please let us know. Thanks!
Comment 7 Harikrishnan 2017-03-09 12:30:27 UTC
Hi Jimmy Garrido,

I was not exactly aware of the specific version in which this was working. This is reported on October 10 a long time ago.

It was surely working on the Xamarin 4.0 but a kind of noticed in the Xamarin 4.1 releases only. It is definitely a regression. But kind of need to check from Xamarin 4.0.
Comment 8 Dharmendar 2017-04-27 09:55:24 UTC
As mentioned by Harikrishnan, Jimmy Garrido have only provided work around not an answer.So that I'm reopening this bug.
Comment 9 Jimmy [MSFT] 2017-06-19 19:43:05 UTC
Setting this back to confirmed so it can get looked at further by the engineers. In the meantime the workaround is to include the list of assemblies when you initialize Forms: https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/#Target_Invocation_Exception_when_using_Compile_with_.NET_Native_tool_chain