[英]How To Create An Executable from Visual Studio Project
So currently I have a project in Visual Studio that runs perfectly.所以目前我在 Visual Studio 中有一个运行完美的项目。 When I build the project and create the.exe build in my Debug folder I can run it without any problems.
当我构建项目并在我的 Debug 文件夹中创建 .exe 构建时,我可以毫无问题地运行它。 However, when I try to share my.exe build with other co-workers the project doesn't run and crashes.
但是,当我尝试与其他同事共享 my.exe 构建时,该项目不会运行并崩溃。 At first the project described that the dependencies weren't able to be located.
起初,该项目描述了无法找到依赖项。 I then added the dependencies to the folder where the.exe program was located and it still doesn't work.
然后我将依赖项添加到.exe程序所在的文件夹中,它仍然无法正常工作。
So what is the best way to create a.exe program that I can hand out to people?那么创建一个我可以分发给人们的.exe程序的最佳方法是什么? And is there a way to test the program in an "outside" environment on my computer?
有没有办法在我的计算机上的“外部”环境中测试程序? Is there a way to create a.exe program that's not located in my debug folder?
有没有办法创建不在我的调试文件夹中的.exe 程序?
Give them the whole debug folder with the exe.用 exe 给他们整个调试文件夹。 It should work.
它应该工作。 To have less files and optimization from the compiler use release instead of debug mode.
要从编译器获得更少的文件和优化,请使用发布而不是调试模式。 Give them the release folder in this case.
在这种情况下,给他们发布文件夹。
If you want even less files install the nuget package fody costura which will pack all.dll into the exe如果您想要更少的文件,请安装 nuget package fody costura,它将 all.dll 打包到 exe 中
If you want to create an installer, check out click once deployment.如果要创建安装程序,请查看单击一次部署。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.