question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XamlC resolves x:DataType incorrectly

See original GitHub issue

Description

This is partly a collection of issues and partly a more specific issue. Not sure if this is 100% a bug in all cases either.

XamlC uses the x:DataType="<type-name>" on <DataTemplate> to generate type-specific bindings, however, somce times the scope is incorrect or if the XAML is wrong but happens to match there is no exception and just fails silently.

In debug you can also get these errors using <_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug> but still no warnings or exceptions anywhere.

Steps to Reproduce

  1. Clone https://github.com/mattleibow/maui-bug-repros/tree/repro-xamlc-datatype
  2. Run
  3. Observe that not all the collection views have items in them

Link to public reproduction project repository

https://github.com/mattleibow/maui-bug-repros/blob/repro-xamlc-datatype/MauiApp1/MainPage.xaml

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

All versions

Did you find any workaround?

Make sure the x:DataType is specified correctly, and on every level of templates.

Relevant log output

No response

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
danardeleancommented, Mar 9, 2023

Can you give some love (priority) to this issue (I created a duplicated one yesterday the one @mattleibow mentioned) ?

From what I see Compiled bindings don’t actually work as compiled bindings in MAUI and this issue is 3 months old

Thanks

3reactions
Syed-RIcommented, Jul 5, 2023

Bump

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot resolve DataType XAML C# - Stack Overflow
It is a bug in the Visual Studio 2015 to solve it just comment that part of the code and run it. after...
Read more >
XamlC error XFC0000 : Cannot resolve type <type>
Hi Upgraded Xamarin solution to MAUI using upgrade wizard. I am getting two errors; In App.xaml it gives 'XamlC error XFC0000 : Cannot ......
Read more >
XamlC error XFC0000: Cannot resolve type
When changing a xaml file, the following error comes up ( see screenshot for full list ). XamlC error XFC0000: Cannot resolve type...
Read more >
Multiple XamlC error XFC0000: Cannot resolve type XYZ ...
Hello, I'm experiencing multiple "cannot resolve type" errors with the DX Xamarin controls. They do NOT prevent compilation, but they are a.
Read more >
Incorrect "Cannot resolve symbol 'DataType'" error for x: ...
Incorrect "Cannot resolve symbol 'DataType'" error for x:DataType in Xamarin. 3. XAML like the following should work without error:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found