When I run my application in computer which I've developed, it works. Buw I'm getting the following error when I run the app in other computer.
***** Exception Text ******* System.IO.FileNotFoundException: Could not load file or assembly 'itextsharp, Version=5.4.0.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. O sistema não pode encontrar o arquivo especificado. File name: 'itextsharp, Version=5.4.0.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca'
at LoadImagesFromFolder.cc2215415.button3_Click_1(Object sender, 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.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
***** Loaded Assemblies ******* mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
LoadImagesFromFolder Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Felipe/Desktop/LoadImagesFromFolder.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1002 built by: RTMGDR 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.1001 built by: RTMGDR 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.1001 built by: RTMGDR
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
***** JIT Debugging ******* To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
System.IO.FileNotFoundException
:The exception that is thrown when an attempt to access a file that does not exist on disk fails.If your code does not have PathDiscovery permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.
there are some thing missed in target OS.Most likely it fails to load another dependency.check
itextsharp.dll
exist on target OS(near application EXE file)In your reference Set Copy to local to true to
itextsharp.dll
.its automatically copyitextsharp.dll
to output near exe file.you need to copy itextsharp.dll also to the new computer
Looks like iTextSharp assembly is missing. Check your reference settings in visual studio und set Copy local to true if iTextSharp is in the global assembly cache. After this the bin folder also contains the iTextSharp.dll und could be copied to the pc again.