By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,040 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,040 IT Pros & Developers. It's quick & easy.

FileNotFoundException Program can't find required assemblies

P: 12
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 'FileNotFoundException' where the program states that its can't find the assemblies required.

What do I need to do?

Thanks

A
Jan 23 '09 #1
Share this Question
Share on Google+
9 Replies


Curtis Rutland
Expert 2.5K+
P: 3,256
Are the programs that you are using Interop for installed on the other PC?
Jan 23 '09 #2

P: 12
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
Expert 2.5K+
P: 3,256
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

P: 12
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
Expert 2.5K+
P: 3,256
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

P: 12
Hmm i'll check the version in that case.
Thanks
Jan 23 '09 #7

100+
P: 344
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

P: 12
How is that possible bassem?

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

Thanks
Jan 25 '09 #9

100+
P: 344
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

Post your reply

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