zoukankan      html  css  js  c++  java
  • [解决]WPF 在 win7 系统无法运行:FileNotFoundException

    开发环境:VS2015 + .NET 4.6.2 

    开发项目1:WPF + CefSharp 

    开发项目2:WPF

    情况:两个项目编译的程序都无法在客户环境的 win7上运行,事件查看器中如下日志:

    1 The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException
    2  at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
    3  at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
    4  at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
    5  at System.Reflection.Assembly.Load(System.Reflection.AssemblyName)

    解决流程:在重装.NET 4.0,.NET4.5.2,.NET4.6.2后,依然无法运行。后,根据网上查到的资料,说是.NET4.x + win7 的大坑。决定把版本退回到.NET4.0,在项目1重装cefsharp时,看到一句:

    1 Deployment:
    2   - Make sure `Visual C++ 2013` is installed (`x86` or x64` depending on your build) or you package the runtime dlls with your application, see the FAQ for details.
    3   

    依赖  Visual C++ 2013  的运行环境。

    解决方案: 安装了   Visual C++ 2013  解决。

    相关其他链接:

    在.Net4.5下编译的WPF程序在Windows7下无法运行 

    ps:不知道我的解决方案是否适用于 上述链接作者遇到的问题。

  • 相关阅读:
    python 基础2.5 循环中continue与breake用法
    python 基础 2.4 while 循环
    python 基础 2.3 for 循环
    python 基础 2.2 if流程控制(二)
    python 基础 2.1 if 流程控制(一)
    python 基础 1.6 python 帮助信息及数据类型间相互转换
    python 基础 1.5 python数据类型(四)--字典常用方法示例
    Tornado Web 框架
    LinkCode 第k个排列
    LeetCode 46. Permutations
  • 原文地址:https://www.cnblogs.com/xiaotiannet/p/9259287.html
Copyright © 2011-2022 走看看