简体   繁体   English

WPF 表示框架异常

[英]WPF Presentation Framework Exception

I am having an issue with my WPF application throwing the following exception:我的 WPF 应用程序出现问题,引发以下异常:

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll PresentationFramework.dll 中发生类型为“System.Reflection.TargetInvocationException”的未处理异常

Additional information: Exception has been thrown by the target of an invocation.附加信息:调用的目标已抛出异常。

The exception occurs inside the InitializeComponent();异常发生在InitializeComponent();内部InitializeComponent(); on the main window:在主窗口上:

<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="NationStates_Telegram_Suite.MainWindow"
        Title="NationStates Telegram Suite" Height="475" Width="610"
        ResizeMode="CanMinimize">

of the xaml.的xaml。 VS Gives me the option to step inside the dll and it is broken at this line if that helps: VS 给了我进入 dll 的选项,如果有帮助,它会在这一行被破坏:

55F94E4B push dword ptr [ebp+8]

I have commented out everything I think I tried commenting out all of the code changes I made to know avail.我已经注释掉了我认为我尝试注释掉所有我知道有用的代码更改的所有内容。 How does one resolve this?怎么解决这个问题?

One strategy to employ is to remove any bindings in the xaml and run until the problem stops.采用的一种策略是删除 xaml 中的所有绑定并运行,直到问题停止。

There may be a race condition with a binding and initialization which is occurring.可能存在正在发生的绑定和初始化的竞争条件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在WPF中,在部署XAML解析时,如果将其他本地dll的本地副本设置为false,则会从表示框架dll抛出异常 - In WPF, While deploying XAML parse exception thrown from presentation framework dll when set copy local as false for other dlls WPF中的数据表示 - Data presentation in WPF BitmapFrame.Create 上的异常(WPF 框架中的错误?) - Exception on BitmapFrame.Create (bug in WPF framework?) WPF中的MVVM和Entity Framework未处理的异常 - MVVM in WPF with Entity Framework unhandled exception 将WPF应用程序迁移到.net Framework 4.5.1之后的实体框架异常 - Entity Framework exception after migrating WPF application to .net Framework 4.5.1 在WPF中的帧中显示Powerpoint演示文稿 - Show a Powerpoint Presentation in a Frame in WPF 尝试加载PowerPoint演示文稿的异常 - Exception trying to load powerpoint presentation Windows XP .NET Framework 4.0中WPF xaml中的异常 - Exception in WPF xaml in Windows XP .NET Framework 4.0 Windows Presentation Foundation(WPF)项目不支持AppCommand - AppCommand are not supported in a Windows Presentation Foundation (WPF) project Windows Presentation Foundation(WPF)项目不支持控件 - Controls is not Supported in the Windows Presentation Foundation (WPF) Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM