编译静置C#应用程序单独的EXE在Visual Studio 2010 [英] Compile to stand alone exe for C# app in Visual Studio 2010
问题描述
这个问题类似
<一href=\"http://stackoverflow.com/questions/2035083/compile-to-a-stand-alone-executable-exe-in-visual-studio\">http://stackoverflow.com/questions/2035083/compile-to-a-stand-alone-executable-exe-in-visual-studio
但什么也没有为我工作。
But nothing there works for me.
我写一个应用程序,在C#中非常简单。我想这编译为一个独立的exe文件,但我似乎无法找到正确的设置做到这一点。一切编译成发布的文件夹,并且只有在设置/安装文件。
I've written an app that is very simple in C#. I want this to compile to a stand alone exe file, but I can't seem to find the proper settings to do this. Everything compiles into a publish folder and there is only the setup/install files.
谢谢!
推荐答案
您只需编译。在bin \\发布(或BIN \\调试)文件夹中的.exe会在那里。
You just compile it. In the bin\Release (or bin\Debug) folder, the .exe will be in there.
如果你问如何使不依赖于.NET框架的所有可执行文件,那么这是一个很多困难,你就需要购买类似的RemoteSoft's Salamader 的。一般情况下,这是不值得费心:Windows Vista中自带.NET框架2.0 pre-已经安装了,所以如果你担心,你可以只针对2.0框架(那么只有XP用户必须安装该框架)。
If you're asking how to make an executable which does not rely on the .NET framework at all, then that's a lot harder and you'll need to purchase something like RemoteSoft's Salamader. In general, it's not really worth the bother: Windows Vista comes with .NET framework 2.0 pre-installed already so if you're worried about that, you can just target the 2.0 framework (then only XP users would have to install the framework).
这篇关于编译静置C#应用程序单独的EXE在Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!