... or one of its dependencies. The system cannot find the file specified... 加载指定dll失败
来源:互联网 发布:雪豹特种部队 知乎 编辑:程序博客网 时间:2024/04/30 20:55
我们在写代码的时候偶尔会遇到下面的问题。
... or one of its dependencies. The system cannot find the file specified... 这类问题主要是告诉用户当前的dll找不到或者是缺少相应的引用。大家不妨加上下面的catch语句试下。我们看下errorMessage后就知道问题出在哪里了。
using System.IO;using System.Reflection;try{ //The code that causes the error goes here.}catch (ReflectionTypeLoadException ex){ StringBuilder sb = new StringBuilder(); foreach (Exception exSub in ex.LoaderExceptions) { sb.AppendLine(exSub.Message); if (exSub is FileNotFoundException) { FileNotFoundException exFileNotFound = exSub as FileNotFoundException; if(!string.IsNullOrEmpty(exFileNotFound.FusionLog)) { sb.AppendLine("Fusion Log:"); sb.AppendLine(exFileNotFound.FusionLog); } } sb.AppendLine(); } string errorMessage = sb.ToString(); //Display or log the error based on your application.}
- ... or one of its dependencies. The system cannot find the file specified... 加载指定dll失败
- Could not load file or assembly 'App_Web_xxxx' or one of its dependencies. The system cannot find the file specified.
- Could not load file or assembly "xxx" or one of its dependencies. The system cannot find the file sp
- Parser Error Message: Could not load file or assembly 'NameSpace' or one of its dependencies. The system cannot find the file sp
- STSDev失败 The System cannot find the file specified 解决方案
- RemotingException: “All pipe instances are busy.” or “The system cannot find the file specified.” ★★
- Error code 2: The system cannot find the file specified.
- java.io.filenotfoundexception: the system cannot find the file specified
- sqlserver The system cannot find the file specified
- Could not load file or assembly "\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies.
- Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. 动态链接库(DLL)初始化例程
- 添加引用时出现one of its dependencies,requires a later version of the .NET Framework than the one specified
- (Error:The system cannot find the file specified)用C#生成.dll 供VB6的开发人员调用
- Could not load file or assembly'System.Data.SQLite.dll' or one of its depedencies
- Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made
- Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0' or one of its dependencies
- “Could not load file or assembly'OracleDAL' or one of its dependencies. 系统找不到指定文件”解决方法
- Could not load file or assembly 'XXXXXXXX' or one of its dependencies. 试图加载格式不正确的程
- dedecms产品特色
- CStdioFile的用法
- Django+nginx+fastcgi 配置
- dedeCMS开发环境
- UIAlertView (ProgressHUD)
- ... or one of its dependencies. The system cannot find the file specified... 加载指定dll失败
- 双线性内插值算法用于放大
- PHP用CURL伪造IP和来源
- STL源码之迭代器
- 'Times' 附近有语法错误
- Adding Properties to an Objective-C Category
- TC使用技巧——复制文件名及路径
- CMake生成VS2012 ARM project遇到的问题
- js调用打印当前页的两种方法