简体   繁体   English

Csharp 应用程序仅适用于我的电脑 Visual Studio 2019

[英]Csharp app only work on my pc Visual Studio 2019

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如果我从 visual studio 或从 VS 外部在我的电脑上运行该应用程序,在使用安装程序 package 编译并安装它之后,在我的电脑上工作正常但是如果我将它安装在其他电脑上,那么我会收到此错误并且不会开始

"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.无法加载文件或程序集“filename.dll”或其依赖项之一。 The specified module could not be found."指定的模块无法找到。”

Note: "filename.dll" is located in to the main folder with app.exe file after installation注意:“filename.dll”在安装后位于带有app.exe文件的主文件夹中

Error From Windows Event Viewer来自 Windows 事件查看器的错误

Application: myapp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception.应用程序:myapp.exe 框架版本:v4.0.30319 描述:进程因未处理的异常而终止。 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() 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() 在 myapp.Form1+KeyHandler..ctor(System.Windows.Forms.Keys, System.Windows.Forms.Form) 在 myapp.Form1..ctor() 在 myapp.Program.Main()

any ideas about that?有什么想法吗?

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我找到了解决方案,缺少这个使用的一些 dll 文件,我知道哪些文件与 dumpbin /imports filename.dll 命令一起使用,所以我下载了所有这些文件并且它有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM