[英]Visual Studio C# EXE instead of .application
I am deploying ac# Windows Forms application to our network server. 我正在将ac#Windows Forms应用程序部署到我们的网络服务器。 It will not need to be installed.
无需安装。 It will only be used internally.
仅在内部使用。 When I publish, It creates a file ourprogram.application .
当我发布时,它将创建一个文件ourprogram.application 。 When double clicking, I get the various checks for a non existent certificate and an annoying "Publisher cannot be verified" stall box.
双击时,我会得到各种检查以查看是否存在不存在的证书以及一个令人讨厌的“无法验证发布者”停顿框。
What I want is to create a simple ourprogram.exe without all the checks. 我想要的是创建一个没有所有检查的简单ourprogram.exe 。 I can copy all the files under bin/release and put it in the network folder - with this method I get my .exe but I have to copy all the other files and dlls that go with it.
我可以复制bin / release下的所有文件,并将其放在网络文件夹中-使用这种方法,我得到了.exe,但我必须复制所有其他文件和dll。
Isn't there a way to simply build an all inclusive .exe ? 是否没有一种方法可以简单地构建包含所有内容的.exe ?
I am using Visual Studio 2013 Professional and .Net 4.5.1 我正在使用Visual Studio 2013专业版和.Net 4.5.1
If you are simply looking to embed the dll's into a single executable, take a look at ILMerge 如果您只是想将dll嵌入单个可执行文件中,请查看ILMerge
ilmerge /target:winexe /out:SelfContainedProgram.exe
Program.exe ClassLibrary1.dll ClassLibrary2.dll
In your project's post-build event command line should produce the single exe you are looking for. 在项目的生成后事件命令行中,应生成您要查找的单个exe。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.