如何在Visual Studio 2008中创建一个可执行文件? [英] How to create a single executable file in Visual Studio 2008 ?

查看:263
本文介绍了如何在Visual Studio 2008中创建一个可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经在Visual Studio 2008,.NET 3.5中创建了Windows窗体应用程序.
现在我要完成我的项目,即创建一个.exe文件,我可以将其提供给某人,他将能够在他的计算机上运行该文件.

在我的项目文件中,我找到了bin/Debug目录,在其中看到一个.exe文件.
我可以按原样使用此文件,还是缺少一些重要的完成程序?

谢谢!

Hi,

I''ve created a Windows Forms Application in Visual Studio 2008, .NET 3.5.
Now I want to finalize my project, i.e. to create a single .exe file which I can give to someone and he will be able to run it on his computer.

In my project files I found bin/Debug directory where I see a .exe file.
Can I just use this file as is, or I am missing some important finalizing procedure ?

Thanks !

推荐答案

如果您正在谈论将dll文件和exe文件合并到一个可执行文件中,则谷歌"ilmerge",您将关闭并运行/.它也可以合并app.config文件.
If you''re talking about merging dll files and exe files into one executable, google "ilmerge", and you''ll be off and running/. It can also merge app.config files.


只要您没有使用任何外部dll文件或向项目中添加.config文件,那么您就可以使用exe文件.
但是,如果将VS中的构建类型从调试更改为发布,则应该得到一个略小的文件,其中没有任何调试信息,但是由您决定是哪个文件.
So long as you have not used any external dll files or added a .config file to your project then yes you can just use the exe file.
However if you change the build type in VS from debug to release you should get a slightly smaller file which does not have any debug information in it, but it''s up to you which one you send out.


如果要连接到数据库,则在其他用户运行exe时需要提供与数据库的连接.
If you are connecting to a database, you will need to provide a connection to the database when the other user runs your exe.


这篇关于如何在Visual Studio 2008中创建一个可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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