创建一个独立的.exe文件 [英] Create a standalone .exe file

查看:107
本文介绍了创建一个独立的.exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中内置了一个控制台应用程序。

I have a console application built in visual studio 2010.

当我实际构建项目时,我在\bin\Debug\下得到了.exe文件。 MyProj.exe。

When I actually build the project I am getting .exe file under \bin\Debug\MyProj.exe.

当我从其他位置粘贴并运行此.exe时,它也在期待其他文件。

When I Paste and run this .exe from other location it is expecting other files too.

任何人都想如何将其作为独立的exe文件。

Any thoughts how can I make this as Stand alone exe file.

推荐答案


  1. 调试库中应该有其他DLL。您需要那些文件来运行您的exe。

  1. There should be other DLL's in the Debug library. You need those to run your exe.

如果其中没有DLL,请确保将所需引用的复制本地属性设置为True,并重新构建。

If there are no DLL's there, make sure you set the 'Copy local' property of the required references to True, and build again.

如果要制作独立程序,应在解决方案中创建一个新的Setup项目。包括应用程序项目中的主要输出,并且安装程序应自动包含所需的DLL。构建设置项目后,您可以将应用程序安装为独立软件。

If you want to make a standalone program, you should create a new Setup project in your solution. Include the Primary Output from your application project, and the setup should include the required DLL's automatically. Once you build the setup project, you can install your application as a standalone software.

这篇关于创建一个独立的.exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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