Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

(Jetbrains Rider) Unable to cast object of type RectangleViewModel to type INode #59

Open
AGhostik opened this issue Mar 27, 2024 · 1 comment

Comments

@AGhostik
Copy link

AGhostik commented Mar 27, 2024

How to reproduce:

  1. Download/clone repo
  2. Open NodeEditor.sln with Jetbrains Rider (with Visual Studio not reproducible)
  3. Run Debug NodeEditor.Desktop

I can't figure out what the difference is between Rider and VS. I am currently in the process of researching the issue.

It throws exception on public static void Main, class Program.cs, line 10

System.InvalidCastException: Unable to cast object of type 'NodeEditorDemo.ViewModels.Nodes.RectangleViewModel' to type 'NodeEditor.Model.INode'.
at CompiledAvaloniaXaml.XamlIlHelpers.NodeEditor.Model.INode,NodeEditorAvalonia.Model.Content!Getter(Object)
at Avalonia.Data.Core.ClrPropertyInfo.Get(Object target) in //src/Avalonia.Base/Data/Core/ClrPropertyInfo.cs:line 27
at Avalonia.Markup.Xaml.MarkupExtensions.CompiledBindings.InpcPropertyAccessor.get_Value() in /
/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:line 88
at Avalonia.Markup.Xaml.MarkupExtensions.CompiledBindings.InpcPropertyAccessor.SendCurrentValue() in /_/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:line 132

@wieslawsoltes
Copy link
Owner

Try 11.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants