【问题标题】:Reinstalling .NET Framework 4.0 leads to app crash with error CLR20r3重新安装 .NET Framework 4.0 导致应用程序崩溃并出现错误 CLR20r3
【发布时间】:2013-10-26 02:10:15
【问题描述】:

我在 Visual Studio 2012 中编写了我的应用程序。我使用了对 OxyPlot 库 (dll) 的外部引用。我已经在一些装有 Windows 7 的机器上测试了我的应用程序(安装了相同的版本,Framework 4.0)。应用程序正常执行,但在装有 Windows XP 的机器上运行失败(也安装了框架 4.0)。
之后,我在装有 Windows 7 的机器上安装了 Framework 4.5,然后删除了 Framework 4.5(从控制面板 => 程序和功能)并重新安装了 Framework 4.0(独立安装程序)。我的应用程序没有运行并出现错误:CLR20r3

Details:
Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: rm.exe
  Problem Signature 02: 1.0.0.0
  Problem Signature 03: 525fd886
  Problem Signature 04: OxyPlot
  Problem Signature 05: 2013.1.100.1
  Problem Signature 06: 525451de
  Problem Signature 07: 218
  Problem Signature 08: 0
  Problem Signature 09: System.IO.FileLoadException
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:    1049

毕竟我从我的项目中删除了 OxyPlot 库,重新编译它,我的应用程序在每台机器上正常启动。
为什么重新安装 Framework 4.0 会导致我的应用程序崩溃,为什么它不能在 Windows XP 上运行?我应该如何解决这个问题? Framework 4.0 和外部的 OxyPlot dll 是什么关系?

【问题讨论】:

    标签: c# .net dll frameworks oxyplot


    【解决方案1】:

    I OxyPlot 不支持 .Net 3.5,仅支持 4 及更高版本。

    Windows XP 不支持 .Net 4.5,仅支持 4(假设您有 Service Pack 3)。

    通常VS2012会安装.Net4.5库。

    这可能有点问题。 (在同一台 Win 7 机器上安装 VS2010 和 2012 导致 Visual Studio 2010 在使用设计器时中断)。您可能会遇到类似的问题。

    另一方面,如果您的目标是 Windows XP,那么您的安全选择是构建您的应用程序以 .Net 2 为目标...(该死,XP 已经过时了)...

    【讨论】:

    • 应用程序在安装了 Framework 4.0 的 Windows 7 上正常执行(在未安装 Visual Studio 的机器上)。但是在接下来的操作之后:
    • Win 7 应该没问题。我怀疑win XP在所有情况下都可以。之后你想说什么:“但是在接下来的操作之后:-”?
    • 应用程序在安装了 Framework 4.0 的 Windows 7 上正常执行(在未安装 Visual Studio 的机器上)。但是在接下来的操作之后:在框架 4.0 上安装框架 4.5 => 卸载 4.5 => 重新安装框架 4.0 =>> 在这些操作应用程序崩溃之后。那么为什么重装 4.0 会崩溃应用呢?
    • 您在 VS2012 上的目标是什么(4?4.5?)此外,此错误发生在缺少引用或 dll 的人身上。建议/解决方法是确保您的应用配置中有CopyLocal=true。正如我之前提到的,在 4 上安装 4.5 会导致一些有趣的问题。删除并重新安装它们,并不总是修复它。恐怕不能用你提供的信息说更多。
    • VS2012 目标是 4.0。 Dll 的属性“CopyLocal=true”。
    【解决方案2】:

    我有同样的问题。 我在安装特定的 .Net 4.0 安全更新后解决了这个问题http://support.microsoft.com/kb/2604121

    我的 WPF 应用程序以 .Net Framework 4.0 为目标并使用 OxyPlot 2014.1.277.1。

    对于这个应用程序,我还做了一些安装/卸载测试,每次删除 .Net Framework 4.0(这是安装完成的先决条件)。

    当我运行应用程序时,出现以下错误:

    详情:
    问题签名:

    Problem Event Name: CLR20r3  
     Problem Signature 01: seling.newmonitor.gui.exe  
     Problem Signature 02: 1.0.0.0  
     Problem Signature 03: 5379d9c4  
     Problem Signature 04: OxyPlot.Wpf  
     Problem Signature 05: 2014.1.277.1  
     Problem Signature 06: 534623ca  
     Problem Signature 07: 224  
     Problem Signature 08: 33  
     Problem Signature 09: System.IO.FileLoadException  
     OS Version: 6.1.7600.2.0.0.256.48  
     Locale ID: 1040  
     Additional Informations 1: 0a9e  
     Additional Informations 2: 0a9e372d3b4ad19135b953a78882e789  
     Additional Informations 3: 0a9e  
     Additional Informations 4: 0a9e372d3b4ad19135b953a78882e789  
    

    然后我安装了 KB2487367 更新,但没有任何改变:应用程序被终止并显示上述错误。
    安装 KB2604121 后,应用程序运行良好,并且我能够看到 OxyPlot 图。
    这些更新是由 Windows Update 提出的。

    这是我在安装 KB2604121 之前遇到的错误堆栈:

    应用程序:Seling.NewMonitor.GUI.exe 框架版本:v4.0.30319
    说明:进程因未处理的异常而终止。
    异常信息:System.IO.FileLoadException 堆栈:

    at OxyPlot.PlotModel.Update(Boolean)  
    at OxyPlot.Wpf.Plot.UpdateModel(Boolean)  
    at OxyPlot.Wpf.Plot.InvalidatePlot(Boolean)  
    at OxyPlot.Wpf.Plot.PlotLoaded(System.Object, System.Windows.RoutedEventArgs)  
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)  
    ...  
    at System.Windows.Application.Run(System.Windows.Window)  
    at Seling.NewMonitor.GUI.App.Main()  
    

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-06-04
      • 1970-01-01
      • 2021-03-07
      • 2020-08-09
      • 2020-10-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多