在 Visual Studio 2010 中编译为 C# 应用程序的独立 exe [英] Compile to stand alone exe for C# app in Visual Studio 2010

查看:50
本文介绍了在 Visual Studio 2010 中编译为 C# 应用程序的独立 exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似于这个问题编译为独立的可执行文件 (.exe)视觉工作室

但没有什么对我有用.

我用 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.

谢谢!

推荐答案

您只需编译它.在 binRelease(或 binDebug)文件夹中,.exe 将在那里.

You just compile it. In the binRelease (or binDebug) folder, the .exe will be in there.

如果您要问如何制作一个完全不依赖于 .NET 框架的可执行文件,那要困难得多,您需要购买诸如 RemoteSoft 的蝾螈.一般来说,这并不值得费心:Windows Vista 已经预装了 .NET Framework 2.0,所以如果您对此感到担心,您可以只针对 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).

这篇关于在 Visual Studio 2010 中编译为 C# 应用程序的独立 exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆