Bug 37157 - xamarin incorrectly tries to compile custom extended controls as belonging to xamarin forms only in xamarin 2
Summary: xamarin incorrectly tries to compile custom extended controls as belonging to...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Stephane Delcroix
Depends on:
Reported: 2015-12-18 21:10 UTC by steve hawkins
Modified: 2016-01-05 10:38 UTC (History)
6 users (show)

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

sample project that reproduced the rror (3.80 MB, application/x-rar)
2015-12-18 21:13 UTC, steve hawkins

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 steve hawkins 2015-12-18 21:10:25 UTC
This scenario has been working perfectly fine in xamarin forms 1.3 and 1.4. Upgraded all packages, cleared down caches and moved to xamarin 2 and get error in some of my custom cotrols that inherit from base xamarin forms class. 

shared solution project. 

example of one of the errors:
The type or namespace name 'LSearchBar' does not exist in the namespace 'Xamarin.Forms' (are you missing an assembly reference?)	

The components are created via this inheritrix chain.
1) EsearchBar [inherits from] LSeachbar [Inherit from] Absolute layout (xamarin)

2) SCell [inherits from] ErrViewCell [Inherits from] ViewCell (xxamarin)

The compile see the custom xaml controls components LSearchBar and ErrViewCell as ebing part of the xamarin framework and not the custom control class. I've tried adding in the fully qualified class paths in the inheritance chain as well and got the same error.

I've The solution i'm adding was a new solution create that mimiks the real app and it produced the same errors.
Comment 1 steve hawkins 2015-12-18 21:13:00 UTC
Created attachment 14352 [details]
sample project that reproduced  the rror
Comment 2 John Miller [MSFT] 2015-12-21 18:10:42 UTC

Each custom control will need to have the namespace defined: 

> xmlns:controls="clr-namespace:XamlError.controls;assembly=XamlError"

Then, change the controls to inherit from that: 


Note* Added the controls: prefix for the namespace.