Tôi có dll này mà tôi đã tạo một thời gian dài trước đây và sử dụng để kết nối với db của một phần mềm cụ thể mà tôi phát triển. Tôi đã không có vấn đề trong hơn 4 năm và vô số các ứng dụng với dll này.Không thể tải tệp hoặc lắp ráp '***. Dll' hoặc một trong các phụ thuộc của nó
Đang cố gắng để triển khai sáng tạo mới nhất của tôi, tôi nhận được lỗi sau:
System.IO.FileNotFoundException: Could not load file or assembly '***.dll' or one of its dependencies. The specified module could not be found.
Vì vậy, đối với mỗi dll mà tôi từng viết, tôi luôn luôn làm một ứng dụng hình thức đơn giản để kiểm tra dll rằng chỉ bằng cách riêng của mình. Chạy ứng dụng đơn giản đó mang lại cùng một lỗi. Các dll không tải hoặc sử dụng bất cứ điều gì khác hơn là: System, System.Data, System.XML. Vì vậy, theo như depencies của nó đi, tôi không thấy bất cứ điều gì sai trái.
Bằng cách này, mọi thứ hoạt động trên đài phát. Vấn đề được giới hạn ở các trạm triển khai. .Net và redistributables cần thiết, vì tôi làm mọi thứ trong C++, được triển khai và làm việc.
Chạy FUSLOGVW.exe hiển thị mọi thứ hoạt động tốt.
Chạy depends.exe cho biết: Cảnh báo: Ít nhất một mô-đun có nhập chưa được giải quyết do chức năng xuất thiếu trong mô-đun phụ thuộc tải chậm.
Tôi đã cố gắng viết lại toàn bộ nội dung. Trong đó mang lại kết quả tương tự.
Hãy tìm bất cứ ai?
CÁC CHỈNH SỬA
Dưới đây là tổng thông báo lỗi:
See the end of this message for details on invoking \"
just-in-time (JIT) debugging instead of this dialog box.\"
************** Exception Text **************\"
System.IO.FileNotFoundException: Could not load file or assembly 'connectionTo.dll' or one of its dependencies. The specified module could not be found.\"
File name: 'connectionToJobboss32.dll'\"
at TESTConnection.Form1.button1_Click(Object sender, EventArgs e)\"
at System.Windows.Forms.Control.OnClick(EventArgs e)\"
at System.Windows.Forms.Button.OnClick(EventArgs e)\"
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\"
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\"
at System.Windows.Forms.Control.WndProc(Message& m)\"
at System.Windows.Forms.ButtonBase.WndProc(Message& m)\"
at System.Windows.Forms.Button.WndProc(Message& m)\"
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\"
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\"
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\"
\"
************** Loaded Assemblies **************\"
mscorlib\"
Assembly Version: 4.0.0.0\"
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)\"
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll\"
----------------------------------------\"
TESTConnection\"
Assembly Version: 1.0.3996.18980\"
Win32 Version: \"
CodeBase: file:///C:/Program%20Files%20(x86)/conn/TESTConnection.exe\"
----------------------------------------\"
System.Windows.Forms\"
Assembly Version: 4.0.0.0\"
Win32 Version: 4.0.30319.1 built by: RTMRel\"
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll\"
----------------------------------------\"
System.Drawing\"
Assembly Version: 4.0.0.0\"
Win32 Version: 4.0.30319.1 built by: RTMRel\"
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll\"
----------------------------------------\"
System\"
Assembly Version: 4.0.0.0\"
Win32 Version: 4.0.30319.1 built by: RTMRel\"
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll\"
----------------------------------------\"
Không có lỗi trong trình xem sự kiện.
Vì tôi viết trong Managed C++, "Any CPU" không tồn tại. Tôi đã kiểm tra anyways quản lý cấu hình và cả hai, dll và ứng dụng, được thiết lập cho Win32. Kể từ khi tôi xây dựng này trong 32 bit, tôi đã chạy nó từ thư mục Program Files (x86) của tôi để tránh các vấn đề với 64bits. ... Vì vậy, tôi đã được nhìn vào điều này, nhưng tôi không thấy bất cứ điều gì sai trái. Oh và một trong những trạm tôi đang cố gắng triển khai trên là một máy 32 bit anyways. –
Có vấn đề tương tự. Tôi đọc câu trả lời của bạn và không thể thay đổi nó với giao diện VS. Vì vậy, tôi đã mở tệp dự án trong trình soạn thảo văn bản và thay đổi nó thành AnyCPU theo cách thủ công và nó hoạt động.Ngay cả giao diện VS chấp nhận giá trị như nó nên ở vị trí đầu tiên. –