Csharp app only work on my pc Visual Studio 2019

124 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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