OK, I'm sure I'm doing something silly here.
I created a new custom control:
namespace MyVote.UI.Droid.Controls
{
public class ImageButton : Button
{
public string Image { get; set; }
}
}
I also created a custom renderer. Without going to much into it, the signature looks like this:
[assembly: ExportRenderer(typeof(ImageButton), typeof(ImageButtonRenderer))]
public class ImageButtonRenderer : EntryRenderer
Now I'm trying to use my custom control in my xaml file with a xmlns:
<?xml version="1.0" encoding="utf-8" ?>
When I try to compile and the code generator runs I get the following error:
Error 2 The "XamlG" task failed unexpectedly.
System.Exception: Can't load types from xmlns clr-namespace:MyVote.UI.Droid.Controls;assembly=MyVote.UI.Droid
at Xamarin.Forms.Build.Tasks.XamlG.GetNamespace(String namespaceuri)
at Xamarin.Forms.Build.Tasks.XamlG.GetType(String nsuri, String type, IList1 typeArguments, Func
2 getNamespaceOfPrefix)
at Xamarin.Forms.Build.Tasks.XamlG.GetNamesAndTypes(XmlNode root, XmlNamespaceManager nsmgr)
at Xamarin.Forms.Build.Tasks.XamlG.GenerateFile(String xamlFile, String outFile)
at Xamarin.Forms.Build.Tasks.XamlG.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() MyVote.UI.Droid
I'm thinking I'm doing something silly but I need another set of eyes on it.