简体   繁体   中英

Visual Studio C# EXE instead of .application

I am deploying ac# Windows Forms application to our network server. It will not need to be installed. It will only be used internally. When I publish, It creates a file 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. 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.

Isn't there a way to simply build an all inclusive .exe ?

I am using Visual Studio 2013 Professional and .Net 4.5.1

If you are simply looking to embed the dll's into a single executable, take a look at 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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