0

If I run the App on my pc from visual studio or from outside of VS, after compiling with the installer package and installing it, in my pc works ok but if I install it on other pc, then I get this error and don't start

"Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately

Could not load file or assembly "filename.dll" or one of its dependencies. The specified module could not be found."

Note: "filename.dll" is located in to the main folder with app.exe file after installation

Error From Windows Event Viewer

Application: myapp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Form.CreateHandle() at System.Windows.Forms.Control.get_Handle() at myapp.Form1+KeyHandler..ctor(System.Windows.Forms.Keys, System.Windows.Forms.Form) at myapp.Form1..ctor() at myapp.Program.Main()

any ideas about that?

Stefan Wuebbe
  • 2,109
  • 5
  • 17
  • 28
merlider
  • 13
  • 2
  • Are both computers using the same version of Window e.g. Window 10? – Karen Payne Dec 30 '22 at 01:06
  • yes both are using windows 10 x64 – merlider Dec 30 '22 at 01:07
  • Consider wrapping code that might be raising an exception with try-catch statements and in the catch write to a log file, see what is happening. If unsure how to log, check out the following [libraries](https://github.com/topics/logging-library?l=c%23). – Karen Payne Dec 30 '22 at 01:49

1 Answers1

0

I found the solution, some dll files are missing that this one uses, I know which ones are used with the dumpbin /imports filename.dll command, so I downloaded all those and it worked

merlider
  • 13
  • 2