简体   繁体   English

非开发PC上的WPF错误-XamlParse

[英]WPF Error on Non-Development PC - XamlParse

I have an error very similar to the one addressed in this question . 我有一个非常类似于该问题的错误。 I am trying to deploy a small c#/Xaml utility on 6 work machines. 我正在尝试在6台工作机上部署一个小的c#/ Xaml实用程序。 4 of the machines run the utility successfully and 2 do not. 其中有4台计算机成功运行该实用程序,而2台则没有。 All machines are windows XP and have .Net frameworks 1-4 installed (my app is compiled against 4.0 and all machines have both client and extended redistributables installed). 所有计算机均为Windows XP,并已安装.Net框架1-4(我的应用程序是针对4.0编译的,所有计算机均安装了客户端和扩展可再发行组件)。

On running the utility, I get the standard "... has encountered a problem and needs to close." 运行该实用程序时,我得到的标准是“ ...遇到问题,需要关闭。” On viewing the error report contents, the problem seems to occur in System.Windows.Markup.XamlParse. 在查看错误报告内容时,似乎在System.Windows.Markup.XamlParse中出现了问题。

I have run .Net 4.0 online installer in "repair" mode and still I get the same problem. 我已经在“修复”模式下运行.Net 4.0在线安装程序,但仍然遇到相同的问题。 I have tried all the suggestions from the post linked above: 我已经尝试了以上链接中的所有建议:

  • The file is deployed alongside a DLL which is present and correct. 该文件与存在且正确的DLL一起部署。
  • UI cultures are identical. UI文化是相同的。
  • All computers are up to date from Microsoft Update. 所有计算机都是Microsoft Update最新的。
  • The assembly does not contain any external resources which are referenced in XAML. 程序集不包含XAML中引用的任何外部资源。

I don't really know where to start with debugging this one. 我真的不知道从哪里开始调试这一步。 Any suggestions? 有什么建议么?

I would suggest setting up remote debugging on the machines that are having the problem and then adding this to the startup code: 我建议在有问题的计算机上设置远程调试 ,然后将其添加到启动代码中:

while (!System.Diagnostics.Debugger.IsAttached)
{
    Thread.Sleep(100);
}

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

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