简体   繁体   English

在Windows Server上无法正确运行.exe

[英]Won't run .exe correctly on Windows Server

I'm trying to run a Console Application on Windows Server 2019 (x64). 我正在尝试在Windows Server 2019(x64)上运行控制台应用程序。 After i run .exe on the server then writes the following error: 在服务器上运行.exe之后,出现以下错误:

Could not load or assembly 'MySql.Data' 无法加载或汇编“ MySql.Data”

..etc for all dependencies. ..etc的所有依赖项。

I tried to run just the .exe file (i didn't copy the whole Release directory) on a few PC and it is working well. 我试图在几台PC上仅运行.exe文件(我没有复制整个Release目录),并且运行良好。 All of them Win 64bit. 他们都赢得了64位。 On the server, .exe only work if i copy the whole /Release directory. 在服务器上,.exe仅在我复制整个/ Release目录时才有效。

I also build and release app with 'Any Cpu' option. 我还使用“任何Cpu”选项构建和发布应用。

Any tip why i need to copy the whole /bin/release directory to run .exe? 为什么我需要复制整个/ bin / release目录才能运行.exe? Why not enough just the .exe file? 为什么.exe文件不够?

Many thanks! 非常感谢!

The exe file doesn't contain the used dlls, just references to the dlls. exe文件不包含使用的dll,仅包含对dll的引用。 That's why they are in the release directory and the reason you need to copy the whole directory. 这就是它们位于发布目录中的原因,也是您需要复制整个目录的原因。

Kind regards Bernd 亲切的问候伯恩德

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

相关问题 如果没有用户登录服务器,Windows servce将无法运行 - Windows servce won't run if no user logged into server Windows 10 Pro x64 10586 无法运行 VS 2008 C# .exe - Windows 10 Pro x64 10586 won't run VS 2008 C# .exe's 应用程序无法从%localappdata%中正确运行 - Application won't run correctly from %localappdata% Microsoft Chart Controls编译为C#exe,但无法运行 - Microsoft Chart Controls compiles to C# exe but won't run Windows服务不会运行多个服务 - Windows service that won't run multiple services ASP.NET Process.start 不会在 Windows 服务器 2012 上运行 - ASP.NET Process.start won't run on Windows Server 2012 Windows Server 2012-可能使服务器运行EXE文件? - Windows Server 2012 - Possible to make the server run EXE files? Windows Form应用程序在启动时不会运行,但会手动运行 - Windows Form app won't run at startup but will run manually 位于Linux服务器上的PHP代码需要运行Windows .exe - PHP code located on linux server needs to run windows .exe 在Windows 7计算机上编写/编译的.NET 4程序将无法在XP上运行 - .NET 4 Program written/compiled on Windows 7 machine won't run on XP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM