Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
The following program has a MainPage that navigates to AnotherPage:
The navigation is initiated with a Button press. The Button's Command property is set to a little function in the code-behind file that does the navigation; the CommandParameter is set (in MainPage.xaml) to the type of AnotherPage.
AnotherPage is in a folder named OrganizationalFolder. Thus, its fully qualified named is XamlCompilationIssue.NavigationalFolder.AnotherPage. It appears in MainPage.xaml as local:OrganizationalFolder.AnotherPage.
The program has XAML compilation enabled for the assembly (in App.xaml.cs) but XAML compilation for MainPage is disabled. The program works as is.
However, if the [XamlCompilation(XamlCompilationOptions.Skip)] attribute in MainPage is commented out, the compilation fails with the error message that OrganizationalFolder.AnotherPage cannot be found.
The folder part of this was confusing at first. after downloading that multi-gig repo it was a bit clearer. This has nothing to do with folders at all, but with compound namespaces (VS, or r#, generates a namespace per folder, but that's all).
Usually, Xaml DO NOT supports compound namespaces, or nested classes because the syntax
could then mean
- instantiate an object of type whateverNamespaceDeclaredInTheLocalXmlns.OrganizationFolder.AnotherPage or
- assign the AnotherPage property (or Bindable, or attached) to the object
From looking at your reproduction, it looks like your issue is that the x:Type markup extension doesn't allow compound namespaces, and enabling that is harmless as there's no confusion possible.
Or at least, that the behavior should be coherent with XamlC or on off.
I'll investigate some more as soon as I finish downloading your multi-gigabytes repository...
The pull request in comment 3 should fix this issue. It has been merged and will be available in a future release.
Could you please provide me fixed version to verify this bug. Any steps to reproduce bug would be great.
I have verified this bug on latest xamarin.forms version - 184.108.40.2066-pre6 .
Followed following steps:
2.set properties build as none for mainpage.xaml.cs where it was enabled for app.xaml.cs
3.Commented [XamlCompilation(XamlCompilationOptions.Skip)] attribute in MainPage.
4.Clean & build project.
Didn't received any error as given in description where as error received on earlier forms version(2.3.4).
Link of screen cast- https://www.screencast.com/t/8A7Pfq4Kr
Gist version link- https://gist.github.com/nehaKh/b23c6bcb1d8fcc706ead38984057bbb8