CompileBinding are unable to bind to nested property of generic class.
See original GitHub issueUsing Avalonia 11.0.999-cibuild0030320-beta
.
Set this in csproj
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
Add a ComboBox with SelectedItem
binding.
Run.
System.BadImageFormatException: An attempt was made to load a program with an incorrect format.
In my project, I was having the error at compile-time, but I reproduced it in the blank template project and this time the error shows up at runtime instead. No idea why. I was also having another error that I’m unable to reproduce, but it could be directly related to this.
I created a repo project here Avalonia11-CompileBinding.zip
OS: Garuda Linux
Issue Analytics
- State:
- Created 7 months ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Typescript: Using nested generic class type
I am trying to use a nested class type generic. Let's say I have the following code: class Base { property: string|undefined; }...
Read more >Bind to nested (navigation) properties in complex objects
Bind to nested (navigation) properties in complex objects. Description. I bind the Grid to Data with complex objects in its model, not only...
Read more >Type.GetNestedTypes Method (System)
GetNestedTypes (BindingFlags). When overridden in a derived class, searches for the types nested in the current Type, using the specified binding constraints.
Read more >Compiled Bindings
If you use compiled bindings and the property you bind to is not found, you will get a compile-time error. Hence you get...
Read more >TypeScript Utility: keyof nested object
In this blog post, we will learn how to build a TypeScript util type, that exposes all the key paths of an object,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK added x64 to the solution. Getting the exact same behavior.
We can’t nicely fallback from compiled bindings to reflection bindings on the flight. But developers can use ReflectionBinding in these places explicitly. If same members are used in the code (and I assume they are, since it’s CurrentItem, probably used somewhere), it won’t be trimmed.