如何使我的应用程序成为独立的exe [英] how to make my application a stand alone exe

查看:75
本文介绍了如何使我的应用程序成为独立的exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我已经在Visual Studio 2010中使用C#创建了一个小型应用程序,并且运行良好,我的问题是如何使它具有exe扩展名独立(一个),而该扩展名可以在不需要.Net框架引擎的其他计算机上运行,(我知道我不想发布和使用设置的应用程序),例如,我想使我的应用程序像notepad.exe一样,一按即可执行.另一个问题是我怎么知道我的应用程序需要哪些.Net文件或dll, 将其包含在我的应用程序路径中.

谢谢您阅读了我的问题.

Hello every body..
I have created a small application using C# with visual studio 2010, and it is working just fine, my question is How to make it a stand alone (one piece) with exe extension which will run on other computer with out needing .Net framework engine, (I know about publish and using set up application i don''t want that) for example I want to make my application just like notepad.exe, one click and it will be executed. and another question is how do I know what .Net files my application is need or dll, to include it with my application path.

thank you for reading my question.

推荐答案

这取决于您准备接受的内容.

如果将您自己(和您的应用程序)限制为.NET 2.0或更低版本,并且将您的应用程序限制为只能在Vista或更高版本的Windows上运行,则无需安装任何.NET框架-因为Vista包含V2.0 .NET,并且Windows 7包含.NET 3.5版.

如果您不能接受这些限制,那么您真的需要看看根本不使用C#,而是使用本机C ++代码.
It depends on what you are prepared to accept.

If you limit yourself (and your application) to .NET version 2.0 or below, and restrict your application to just working on Vista or higher versions of Windows, then you do not need to install any .NET framework - as Vista includes V2.0 of .NET, and Windows 7 includes .NET version 3.5

If you can''t accept these restrictions, then you really need to look at not using C# at all, but using Native C++ code instead.


按照Griff的建议,用本机重写应用程序代码(C ++或Delphi)是一种方法,但可能工作太多.将您的应用程序转换为网络应用程序可能会更容易.现在,客户可以通过浏览器访问它,而无需.NET框架.
As Griff suggested, rewriting the app in native code (C++ or Delphi) is one way but that may be too much work. It may be easier to convert your app into a web-app. Now clients can access it through a browser without needing the .NET framework.


在早期-至少是专业上- ^ ]拥有与 Delphi [ C ++ Builder [
In an earlier life - at least professionally - Anders Hejlsberg[^] had a thing or two to do with Delphi[^]. So much that C++Builder[^], which is able to utilize the delphi infrastructure will feel quite familiar to c# developers.

Best regards
Espen Harlinn


这篇关于如何使我的应用程序成为独立的exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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