一般的程序找Dll文件是按照入下顺序:首先在EXE当前目录中找,然后在Windows目录中找,再然后在system32中找。
怎么我写的Dll文件放在Windows或System32中会报错呢?到底是Dll的问题还是EXE的问题?是不是能设置查找的目录?
解决方案 »
- arraylist和数据结构的问题
- 【兔子sama进来下】问你一个问题啊!!!!!!
- winform中用ReportViewer控件调用远程服务报表失败
- winform改变语言后,窗体布局错乱问题
- 怎样才能找到sysimport?
- 自己开发的一个测试数据自动生成工具,有用者请留下email
- 求教:如何从*.jpg文件中取字,并复制?
- DataGrid 使用多张表的问题]
- dataset.readxml namespace 列名重复问题
- 请问在C#中如何将添加的图片随着窗体的最大化而最大化??谢谢!!
- 请问用OLEDB连接的字符串怎么写在WEB.CONFIG里面?
- 用c#调用delphi5写的dll问题!很急!高分
如果没有写路径才按你说的那种方法寻找最主要是运行exe后提示什么信息?
错误信息是:应用程序中发生了未处理的异常。如果单击“退出”,应用程序将忽略此错误并常识继续。如果单击“退出”,应用程序将立即关闭。
找不到文件或程序集名称“Socg.转换.Table_To_Tree”,或找不到它的一个依赖项。。
详细信息:
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参阅此消息的结尾。************** 异常文本 **************
System.IO.FileNotFoundException: 找不到文件或程序集名称“Socg.转换.Table_To_Tree”,或找不到它的一个依赖项。
文件名: “Socg.转换.Table_To_Tree”
at 人员管理.人员管理.人员管理_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)=== Pre-bind state information ===
LOG: DisplayName = Socg.转换.Table_To_Tree, Version=1.0.2061.43068, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = E:\cw\Source\C#\人员管理\bin\Debug\
LOG: Initial PrivatePath = NULL
Calling assembly : 人员管理, Version=1.0.2062.1015, Culture=neutral, PublicKeyToken=null.
===LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Socg.转换.Table_To_Tree, Version=1.0.2061.43068, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///E:/cw/Source/C#/人员管理/bin/Debug/Socg.转换.Table_To_Tree.DLL.
LOG: Attempting download of new URL file:///E:/cw/Source/C#/人员管理/bin/Debug/Socg.转换.Table_To_Tree/Socg.转换.Table_To_Tree.DLL.
LOG: Attempting download of new URL file:///E:/cw/Source/C#/人员管理/bin/Debug/Socg.转换.Table_To_Tree.EXE.
LOG: Attempting download of new URL file:///E:/cw/Source/C#/人员管理/bin/Debug/Socg.转换.Table_To_Tree/Socg.转换.Table_To_Tree.EXE.************** 已加载的程序集 **************
mscorlib
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
人员管理
程序集版本: 1.0.2062.1015
Win32 版本: 1.0.2062.1015
基本代码: file:///E:/cw/Source/C%23/人员管理/bin/Debug/人员管理.exe
----------------------------------------
System.Windows.Forms
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Socg.常用窗体.SQL连接窗体
程序集版本: 1.0.2060.27985
Win32 版本: 1.0.2060.27985
基本代码: file:///E:/cw/Source/C%23/人员管理/bin/Debug/Socg.常用窗体.SQL连接窗体.DLL
----------------------------------------
Socg.数据连接.SQL连接
程序集版本: 1.0.1122.10554
Win32 版本: 1.0.1122.10554
基本代码: file:///E:/cw/Source/C%23/人员管理/bin/Debug/Socg.数据连接.SQL连接.DLL
----------------------------------------
System.Data
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Drawing
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.EnterpriseServices
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------
mscorlib.resources
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/mscorlib.resources/1.0.5000.0_zh-chs_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 1.0.5000.0
Win32 版本: 1.1.4322.573
基本代码: file:///c:/winnt/assembly/gac/system.windows.forms.resources/1.0.5000.0_zh-chs_b77a5c561934e089/system.windows.forms.resources.dll
----------------------------------------************** JIT 调试 **************
计算机的配置文件(machine.config)的
system.windows.forms 节中必须设置 jitDebugging 值。
编译应用程序时还必须启用\r\n调试。\r\n\r\n例如: \r\n\r\n<configuration>\r\n <system.windows.forms jitDebugging="true" />\r\n</configuration>\r\n\r\n启用 JIT 调试后,任何未处理的异常\r\n都将被发送到此计算机上注册的 JIT 调试器,\r\n而不是由此对话框处理。\r\n