我在部署 WPF 项目时遇到问题,部署的项目在启动时崩溃并在第 4 行位置 70 处产生内部异常“不能在同一实例上嵌套 BeginInit 调用”的 XAML.Parse.Exception。应用程序在我的计算机上具有完全权限。我问这个问题是因为关于这个问题的几个问题并没有真正解决这个问题。
这是它在前几行中引用的 XAML 代码。
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="ASRV.MainWindow"
Title="ASRV GUI" Height="768" Width="1024" ResizeMode="CanMinimize">
<Window.Resources>
</Window.Resources>
<Window.Background>
<ImageBrush ImageSource="pack://siteoforigin:,,,/background.png"/>
</Window.Background>