简体   繁体   English

Visual Studio C#EXE而不是.application

[英]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

Something like 就像是

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.

相关问题 Visual Studio 2019 将 C# 程序导出为 DLL 而不是 EXE? - Visual Studio 2019 Exports C# Program as DLL instead of EXE? Visual Studio C#锁定.exe文件 - visual studio C# locking .exe file 配置Visual Studio 2012以使用Mono的C#编译器代替默认的csc.exe - Configure Visual Studio 2012 to use Mono's C# compiler instead of the default csc.exe C#应用程序在已部署(.exe)版本中因缓冲区溢出而崩溃,但在Visual Studio中却没有 - C# Application crashes with Buffer Overrun in deployed (.exe) version, but not in Visual Studio 在Visual Studio 2015中使用C#为Windows独立应用程序创建exe - Creating an exe for a Windows standalone application using C# in Visual Studio 2015 如何防止在 Windows 窗体应用程序构建中创建 .exe.config(Visual Studio 社区 2019 - C#) - How prevent to create a .exe.config in a Windows Forms Application build (Visual Studio Community 2019 - C#) C#Windows应用程序可以在Visual Studio中正常启动外部exe,但安装后无法启动 - c# windows application launches external exe's fine in visual studio but not when installed 在C#Visual Studio桌面应用程序的exe文件名中包含版本号 - Include version number in exe file name in C# Visual Studio desktop application C#Visual Studio应用程序中的Google Maps - Google Maps in C# Visual Studio application 调试C#应用程序-Visual Studio - Debugging C# application - Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM