473,839 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileNotFoundExc eption Program can't find required assemblies

12 New Member
Hi,

I have created a new project and have used the CrystalReports assemblies and the Microsoft Interop dlls. I copied my program to another PC and when I try to run the methods that use these assemblies I get a 'FileNotFoundEx ception' where the program states that its can't find the assemblies required.

What do I need to do?

Thanks

A
Jan 23 '09 #1
9 7990
Curtis Rutland
3,256 Recognized Expert Specialist
Are the programs that you are using Interop for installed on the other PC?
Jan 23 '09 #2
necro1000
12 New Member
I am using the Interop.Excel dll and the other pc has Office installed aswell. Is there a specific way to install dlls?
Jan 23 '09 #3
Curtis Rutland
3,256 Recognized Expert Specialist
Hmm, the DLLs should be installed with Office. Perhaps it is failing because Crystal Reports is not installed? I don't know much about Crystal.
Jan 23 '09 #4
necro1000
12 New Member
exact error ;
Expand|Select|Wrap|Line Numbers
  1. See the end of this message for details on invoking 
  2. just-in-time (JIT) debugging instead of this dialog box.
  3. ************** Exception Text **************
  4. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
  5. File name: 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
  6. at PackTrack.AirMaltaDataLogUC.button1_Click(Object sender, EventArgs e)
  7. at System.Windows.Forms.Control.OnClick(EventArgs e)
  8. at System.Windows.Forms.Button.OnClick(EventArgs e)
  9. at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  10. at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  11. at System.Windows.Forms.Control.WndProc(Message& m)
  12. at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  13. at System.Windows.Forms.Button.WndProc(Message& m)
  14. at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  15. at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  16. at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  17. WRN: Assembly binding logging is turned OFF.
  18. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
  19. Note: There is some performance penalty associated with assembly bind failure logging.
  20. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
  21.  
  22. ************** Loaded Assemblies **************
  23. mscorlib
  24. Assembly Version: 2.0.0.0
  25. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  26. CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
  27. ----------------------------------------
  28. PackTrack
  29. Assembly Version: 1.0.0.0
  30. Win32 Version: 1.0.0.0
  31. CodeBase: file:///C:/Program%20Files/PackTrack/bin/Debug/PackTrack.exe
  32. ----------------------------------------
  33. System
  34. Assembly Version: 2.0.0.0
  35. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  36. CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
  37. ----------------------------------------
  38. System.Windows.Forms
  39. Assembly Version: 2.0.0.0
  40. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  41. CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  42. ----------------------------------------
  43. System.Drawing
  44. Assembly Version: 2.0.0.0
  45. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  46. CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  47. ----------------------------------------
  48. MySql.Data
  49. Assembly Version: 5.0.9.0
  50. Win32 Version: 5.0.9.0
  51. CodeBase: file:///C:/Program%20Files/PackTrack/bin/Debug/MySql.Data.DLL
  52. ----------------------------------------
  53. System.Data
  54. Assembly Version: 2.0.0.0
  55. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  56. CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
  57. ----------------------------------------
  58. System.Transactions
  59. Assembly Version: 2.0.0.0
  60. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  61. CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
  62. ----------------------------------------
  63. System.Configuration
  64. Assembly Version: 2.0.0.0
  65. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  66. CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  67. ----------------------------------------
  68. System.Xml
  69. Assembly Version: 2.0.0.0
  70. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  71. CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
  72. ----------------------------------------
  73. System.EnterpriseServices
  74. Assembly Version: 2.0.0.0
  75. Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
  76. CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
  77. ----------------------------------------
  78. ************** JIT Debugging **************
  79. To enable just-in-time (JIT) debugging, the .config file for this
  80. application or computer (machine.config) must have the
  81. jitDebugging value set in the system.windows.forms section.
  82. The application must also be compiled with debugging
  83. enabled.
  84. For example:
  85. <configuration>
  86. <system.windows.forms jitDebugging="true" />
  87. </configuration>
  88. When JIT debugging is enabled, any unhandled exception
  89. will be sent to the JIT debugger registered on the computer
  90. rather than be handled by this dialog box.
Jan 23 '09 #5
Curtis Rutland
3,256 Recognized Expert Specialist
OK, are you sure that you have Office 2007 installed on the client PC? Because the dlls are different for each version.
Jan 23 '09 #6
necro1000
12 New Member
Hmm i'll check the version in that case.
Thanks
Jan 23 '09 #7
Bassem
344 Contributor
You may create a setup project and involove the .net dlls in it, at client install instead of copy and past.
Jan 25 '09 #8
necro1000
12 New Member
How is that possible bassem?

I install the visual studio common files on the client and it worked though!

Thanks
Jan 25 '09 #9
Bassem
344 Contributor
No, not all common files, but only the desired .net dlls .
I didn't do it before, but i'm sure of, at setup project you can choose to involve the required .net dlls.
My PC is out of work now, so i can't check it.
Jan 29 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2971
by: normd | last post by:
I have a text file which contains VB.NET code. The VB.NET code is actually a Class that can contain code, which simply displays a message box or does something more complicated (i.e Excel/Word Automation, communicate with the DB and/or WebServices, talk to other classes). To achieve a complicated task, this class would need reference to other custom assemblies (not part of .net framework) that are possibly not installed to the GAC. In my...
4
2647
by: W1ld0ne74 | last post by:
I have rewritten a VB6 COM+ object using C# .Net. The object works as expected and registers itself in COM+ on my PC, the development server and even on the Test server. I did battle with this problem on the test server, but it seemed to resolve itself. This problem however is not resolving itself on the Production server. The COM+ object chats with a 3rd party dll (Registered using Regsrv32) via an Interop proxy dll. All are in the same...
4
2521
by: Brian Keating | last post by:
Hi there, I'm wondering is there any way i can gracefully handly the System.IO.FileNotFound exception. Let me explain my situation. I've got a window forms app. I've exception handlers for
8
8920
by: Peter Kirk | last post by:
Hi, when I run my c# program I get this error: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll. Additional information: File or assembly ASolutions.Directory.Service or one of its dependencies was not found. Great... but how do I find out exactly what could not be found? (I am using several libraries, which also use other libraries, and I would really like to know what it is I need to find).
3
2421
by: Nick | last post by:
Hello, Let me explain my situation. There is an application in C++ (that I didn't write) that needs to call a C# DLL. One option, I believe, would be to compile the app with the clr switch. Rather than do that first the other developer wondered if I could create an intermediate managed code DLL that would call my C# code. So, I created a C++ DLL that exports a function and compiled it with the clr switch. It calls my C# code. To test...
6
1664
by: Prodip Saha | last post by:
I am trying to load a shared component like DataAccess from GAC and not been able to successfully get it working for my asp.net application. The dll is loading from the GAC with correct version and I can verify it from Output window of VS.Net IDE. I can change the policy and it works because I can see the oldversion is redirected to newVersion. The problem is- unless I copy the dll in the bin directory of the application I get...
2
8386
by: GeorgeB | last post by:
I have built a solution in vb.net with 2 projects the project with the class libraries and the project which consumes them. The class library project references some other libraries(Different Class projects). The solution compiles without a problem. I cannot run the solution in debug mode within the IDE, despite that ALL the projects are for debugging. The app run correctly when I invoke it outside the IDE from the bin directory.
0
9172
by: Rob Dob | last post by:
Hi, I have a VS2003 C# asp.net project that has been converted into a VS2005 project. Everything seemed to work well until I make a modification to anything within the Component Designer window, i.e. I add a SQLCommand. At that point VS2005 changes my C# file to now load all Selectcommantext data from the resource file instead of the .aspx.cs file. then when I try and once again run my application I get the following error: looking...
2
11022
by: =?Utf-8?B?c2FtMDFt?= | last post by:
I have a remoting application that was developed on a Windows XP SP2 machine with VS2005 SP1. I finally got everything deployed using Wix 3.0, and it works great. Problem is, when I install the msi on a W23 server SP2, I get the following error: System.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation....
0
9855
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9697
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10906
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9426
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7828
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7017
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5682
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5866
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4482
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.