项目 exe 和项目设置有什么区别
我想知道为什么我们需要创建应用程序的设置?我知道这是一个非常愚蠢的问题,但我想知道。
因为当我们在.net中创建新项目时,项目的调试文件夹包含项目exe,那么为什么我们需要创建项目的安装程序。
I want to know that why we need to create setup of the application? I know it is very silly question but i want to know it.
Because when we create new project in the .net then the debug folder of the project contains project exe then why should we need to create setup of the project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于对其他程序集/DLL 有许多依赖项的 Windows 应用程序来说,使用安装项目可能是一个很好的解决方案。安装程序将找出应用程序的依赖项并自动包含它们。
注意:这不包括.NET 框架。
Using a setup project can be a good solution for a Windows application that has many dependencies on other assemblies / DLLs. The setup will figure out what the dependencies are for the application and automatically include them.
Note: This does not include the .NET framework.
好吧,如果(且仅当)您的完整项目由一个 exe 文件组成,并且永远不需要安装在任何地方,并且应该由安装它的同一类型的用户运行,并且根本没有依赖关系,那么你不需要设置。
设置的目的是设置项目运行的环境:检查是否满足必要的先决条件,检查许可证,将可执行文件放入某个标准文件夹(例如
中的某个位置) %PROGRAMFILES%
),获取必要的配置(最明显的是“对于所有用户/仅对于此用户”),设置快捷方式和卸载程序(应该能够恢复所有这些)。另请注意,各种安装方法(例如msi
)允许托管安装,当站点管理员需要在 10K 计算机上安装程序而无需单独登录每台计算机时,这可能会有点用。Well, if (and only if) your complete project consists of that one
exe
file, and never needs to be installed anywhere, and is supposed to be run by the same type of users who installs it, and has no dependencies at all, then you don't need setup.The purpose of the setup is to set up the environment in which your project will run: check if the necessary prerequisites are met, check license, put the executable into some standard folder (e.g. somewhere in
%PROGRAMFILES%
), get the necessary configuration (most notably "for all users/only for this user"), set up shortcuts, and the uninstaller (which should be able to revert all that). Note also that various setup methods (e.g.msi
) allow for managed installation, which may be somewhat useful when the site admin needs to install the program on 10K computers without logging into each one separately.在.net(vb 5.0等)之前,如果没有安装项目,安装应用程序是相当困难的:当时的大多数应用程序都是基于COM对象的,需要手动安装。在.net中,微软已经摆脱了这一点,使得所谓的“复制和过去部署”成为可能。这意味着您要问的是:理论上,要部署应用程序,您只需要复制并粘贴所有文件(即使对于某些人来说这可能已经足够困难了)。有时您需要执行一些额外的步骤来使您的应用程序正常工作,可能在 GAC 中安装某些内容、创建特殊文件夹、检查是否安装了 X 软件等。在这种情况下,您可能需要一个安装项目来进行部署过程更轻松
before .net (vb 5.0,etc) it was quite hard install an application without a setup project: most of the application at the age were based on COM objects which need to be manually installed. In .net Microsoft has got rid of that of that making possible to do what is called "copy and past deploy"). That means what you are asking: In theory to deploy an application you just need to copy and past all the files(even if for someone it could be already enough difficult). Sometime you need to do some extra steps to makes your application work perhaps installing something in the GAC, creating a special folders,checking if the X software is installed, etc. In this scenario you would probability need a setup project to make the deploy process easier