Bug 60755 - ExportRendererAttribute's namespace on UWP is inconsistent with other platforms
Summary: ExportRendererAttribute's namespace on UWP is inconsistent with other platforms
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-11-19 08:32 UTC by Happypig375
Modified: 2017-12-21 23:22 UTC (History)
4 users (show)

Tags: fr
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:

Description Happypig375 2017-11-19 08:32:53 UTC
ExportRendererAttribute's namespace on iOS and Android is Xamarin.Forms.ExportRendererAttribute, while on UWP it is Xamarin.Forms.Platform.UWP.ExportRendererAttribute. This inconsistency makes it require a #if on top of the file to import Xamarin.Forms.Platform.UWP to declare ExportRendererAttribute in shared code right at the shared project. I think that declaring a Xamarin.Forms.ExportRendererAttribute in the Xamarin Forms UWP package inheriting from Xamarin.Forms.Platform.UWP.ExportRendererAttribute would solve this issue. I cannot do it in my code as this class is sealed.
Comment 1 Happypig375 2017-11-19 08:36:20 UTC
Even GTK and WP8 packages have ExportRendererAttribute declared in Xamarin.Forms.ExportRendererAttribute. Now UWP is the isolated one.
Comment 2 Happypig375 2017-11-19 08:38:49 UTC
Oops, not WP8. Sorry. Just saw that the #if on top of  https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.WinRT/ExportRendererAttribute.cs.
Comment 3 Happypig375 2017-11-19 08:49:48 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/1291