You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to add AvaloniaEdit nuget into a project. Using Avalonia.Desktop 0.9.2
Project template is created from the mvvm template provided by avalonia.
However, the project fails to run with the following exception: Unhandled exception. System.TypeInitializationException: The type initializer for 'AvaloniaEdit.Editing.TextArea' threw an exception.
Here is the entire stack trace:
Unhandled exception. System.TypeInitializationException: The type initializer for 'AvaloniaEdit.Editing.TextArea' threw an exception.
---> System.TypeInitializationException: The type initializer for 'AvaloniaEdit.Rendering.TextView' threw an exception.
---> System.MissingMethodException: Method not found: 'Void Avalonia.Media.Pen..ctor(Avalonia.Media.IBrush, Double, Avalonia.Media.DashStyle, Avalonia.Media.PenLineCap, Avalonia.Media.PenLineCap, Avalonia.Media.PenLineCap, Avalonia.Media.PenLineJoin, Double)'.
at AvaloniaEdit.Rendering.TextView.CreateFrozenPen(IBrush brush)
at AvaloniaEdit.Rendering.TextView..cctor()
--- End of inner exception stack trace ---
at AvaloniaEdit.Editing.TextArea..cctor()
--- End of inner exception stack trace ---
at Builder_cc0eb0a092b34ebca0de3b4a0e5e8c03_resm:AvaloniaEdit.Editing.TextArea.xaml?assembly=AvaloniaEdit.__AvaloniaXamlIlPopulate(IServiceProvider , Styles )
at lambda_method(Closure , IServiceProvider )
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadOrPopulate(Type created, Object rootInstance)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSreCore(String xaml, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSre(String xaml, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri)
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri)
at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded()
at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Controls.ISetResourceParent.ParentResourcesChanged(ResourcesChangedEventArgs e)
at Avalonia.Styling.Styles.<.ctor>b__4_0(IStyle x)
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass0_0`1.<ForEachItem>b__0(Int32 _, T i)
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>g__Add|0(Int32 index, IList items)
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>b__2(Object _, NotifyCollectionChangedEventArgs e)
at Avalonia.Collections.AvaloniaList`1.NotifyAdd(T item, Int32 index)
at Avalonia.Collections.AvaloniaList`1.Add(T item)
at Builder_f5ecc677d06342bca01968013cf8ba82_resm:AvaloniaEdit.AvaloniaEdit.xaml?assembly=AvaloniaEdit.__AvaloniaXamlIlPopulate(IServiceProvider , Styles )
at lambda_method(Closure , IServiceProvider )
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadOrPopulate(Type created, Object rootInstance)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSreCore(String xaml, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSre(String xaml, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri, Boolean isDesignMode)
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Stream stream, Assembly localAssembly, Object rootInstance, Uri uri)
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri)
at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded()
at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Controls.ISetResourceParent.ParentResourcesChanged(ResourcesChangedEventArgs e)
at Avalonia.Styling.Styles.<.ctor>b__4_0(IStyle x)
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass0_0`1.<ForEachItem>b__0(Int32 _, T i)
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>g__Add|0(Int32 index, IList items)
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>b__2(Object _, NotifyCollectionChangedEventArgs e)
at Avalonia.Collections.AvaloniaList`1.NotifyAdd(T item, Int32 index)
at Avalonia.Collections.AvaloniaList`1.Add(T item)
at Avalonia.Styling.Styles.Add(IStyle item)
at SharpVisUI.App.!XamlIlPopulate(IServiceProvider , App ) in /Users/Marin/Rider/SharpVisUI/SharpVisUI/App.xaml:line 1
at SharpVisUI.App.!XamlIlPopulateTrampoline(App )
at SharpVisUI.App.Initialize() in /Users/Marin/Rider/SharpVisUI/SharpVisUI/App.xaml.cs:line 13
at Avalonia.Controls.AppBuilderBase`1.Setup()
at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
at SharpVisUI.Program.Main(String[] args) in /Users/Marin/Rider/SharpVisUI/SharpVisUI/Program.cs:line 14
I know the demo in this repo is working, but I haven't the slightest clue of what I'm missing to make it work.
With further investigation, I noticed that the nuget version uses a constructor for Pen that doesn't exist anymore:
I tried to add AvaloniaEdit nuget into a project. Using Avalonia.Desktop 0.9.2
Project template is created from the mvvm template provided by avalonia.
However, the project fails to run with the following exception:
Unhandled exception. System.TypeInitializationException: The type initializer for 'AvaloniaEdit.Editing.TextArea' threw an exception.
Here is the entire stack trace:
I know the demo in this repo is working, but I haven't the slightest clue of what I'm missing to make it work.
With further investigation, I noticed that the nuget version uses a constructor for Pen that doesn't exist anymore:
The github code of AvaloniaEdit:
The text was updated successfully, but these errors were encountered: