AvaloniaUI / AvaloniaVS

Visual Studio Extension for Avalonia
MIT License
431 stars 83 forks source link

System.Xaml.XamlException #348

Closed chenzanyu closed 1 year ago

chenzanyu commented 1 year ago

Describe the bug

Install Avalonia for Visual Studio 2022 template, it automatically installs the Avalonia Template Studio template, create a desktop application, modify the content of MainView.axaml, the designer is throwing an exception, and it reports: "[Error] 34228 UpdateXamlResult error System.Xaml.XamlException: “Name cannot begin with the ‘<’ character, hexadecimal value 0x3C. Line 16, position 1.”

To Reproduce

template program

AvaloniaVS plugin version

0.10.18.4

Avalonia version

11.0.0-rc1.1

Visual Studio version

VisualdStudio2022 Version: 17.63

Relevant log output

01:02:43.434 [Information] 34228 Connection initialized
01:02:53.202 [Error] 34228 UpdateXamlResult error
System.Xaml.XamlException: “Name cannot begin with the '
' character, hexadecimal value 0x0D. Line 15, position 4.”,行号为“15”,行位置为“4”。
01:02:53.827 [Error] 34228 UpdateXamlResult error
System.Xaml.XamlException: “Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 16, position 1.”,行号为“16”,行位置为“1”。
01:02:54.476 [Error] 34228 UpdateXamlResult error
System.Xaml.XamlException: “Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 16, position 1.”,行号为“16”,行位置为“1”。

Additional context

No response

maxkatz6 commented 1 year ago

Please add more information. How exactly edited MainView.axaml looks like?

chenzanyu commented 1 year ago

Simply replacing the automatically generated TextBlock with Grid or any other element causes the designer to malfunction until F5 is clicked to run the project again.

chenzanyu commented 1 year ago

The designer works fine after updating to v11.0.0