473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

FileNotFoundException Program can't find required assemblies

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
9 7963
Curtis Rutland
3,256 Expert 2GB
Are the programs that you are using Interop for installed on the other PC?
Jan 23 '09 #2
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 Expert 2GB
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
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 Expert 2GB
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
Hmm i'll check the version in that case.
Thanks
Jan 23 '09 #7
Bassem
344 100+
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
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 100+
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
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...
4
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...
4
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...
8
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...
3
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....
6
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...
2
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...
0
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...
2
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.