简体   繁体   English

WPF应用程序在某些计算机上不起作用:停止工作错误

[英]WPF Application doesn't work on some machines: Stopped working error

My WPF application works fine on a number of machines, but now I get a report about this error on a user machine: 我的WPF应用程序在许多机器上运行良好,但现在我在用户机器上收到有关此错误的报告:

Description:
  Stopped working

Problem signature:
  Problem Event Name:    CLR20r3
  Problem Signature 01:    mysoftware.exe
  Problem Signature 02:    1.0.0.1
  Problem Signature 03:    4bbcd9d9
  Problem Signature 04:    PresentationFramework
  Problem Signature 05:    3.0.0.0
  Problem Signature 06:    4a174fbc
  Problem Signature 07:    624f
  Problem Signature 08:    e1
  Problem Signature 09:    System.Windows.Markup.XamlParse
  OS Version:    6.1.7600.2.0.0.256.48
  Locale ID:    1033

I was trying to catch Exception using Application DispatcherUnhandledException but this didn't help. 我试图使用Application DispatcherUnhandledException捕获Exception,但这没有帮助。 And warping Window1 constructor in try/catch block too. 并且在try / catch块中也翘曲Window1构造函数。 .NET Framework 3.5 is installed on that machine. .NET Framework 3.5安装在该计算机上。

How can I figure out the reason of crashing: log this error, debug, ...? 如何找出崩溃的原因:记录此错误,调试,......?

只需确认您已安装.Net Framework 3.5sp1。

The fact that there is a mention of XAML parsing would lead me to check whether the XAML is corrupt on that particular machine. 提到XAML解析的事实将导致我检查XAML是否在该特定机器上损坏。 The easiest way to check it is well formed is to rename it to .xml and open it with Internet Explorer. 检查它的最简单方法是将其重命名为.xml并使用Internet Explorer打开它。 (Even if it is well formed it could still have a problem of some sort.) (即使它形成良好,它仍然可能存在某种问题。)

If it is a ClickOnce deployed app, I would suggest clearing the local cache of the application and relaunching to see if this clears the problem up. 如果它是ClickOnce部署的应用程序,我建议清除应用程序的本地缓存并重新启动以查看是否可以解决问题。

I think the main issue is the fact that the XAML file cannot be loaded. 我认为主要问题是无法加载XAML文件。

That can stem from several problems: 这可能源于几个问题:

  • Is the file meant to be deployed alongside the dll? 该文件是否与dll一起部署? Is it present 它存在吗?
  • Is the client using a different UI culture than the others? 客户端是否使用与其他UI文化不同的UI文化? Are there any satellite assemblies? 有卫星组件吗?
  • What version of the .Net framework is installed? 安装了什么版本的.Net框架? Is it perchance a Client Profile only install? 是否只安装客户端配置文件?

Cheers! 干杯!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM