Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DragAdorner InitializeComponent XamlParseException on TextBlock #2

Closed
ChrisTorng opened this issue Sep 3, 2024 · 2 comments
Closed

Comments

@ChrisTorng
Copy link

Clone and run in VS 2022, got this:
image

System.Windows.Markup.XamlParseException
  HResult=0x80131501
  Message='Initialization of 'System.Windows.Controls.TextBlock' threw an exception.' Line number '26' and line position '36'.
  Source=PresentationFramework
  StackTrace:
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Claudable.Windows.DragAdorner.InitializeComponent() in D:\GitHub\ChrisTorng\cloned\Claudable\Claudable\Windows\DragAdorner.xaml:line 1

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
IndexOutOfRangeException: Index was outside the bounds of the array.

Seems like error on TextBlock Text="{Binding Path}":
image

@PassivePicasso
Copy link
Owner

I've been unable to reproduce this issue unfortunately, even removing the temporary files that claudable creates which would affect that startup state I haven't reproduced this issue.

This may be affected by OS version, or maybe installed .NET SDK?

@ChrisTorng
Copy link
Author

I found this: When using .NET9 pre7 build and run, will throw System.Windows.Markup.XamlParseException.
I'm using newest Microsoft Visual Studio 2022 17.12.0 Preview 1.0. I changed the Target Framework to 9.0 then it worked. It should be a bug in .NET SDK 9 preview. Close this issue.

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

No branches or pull requests

2 participants