简体   繁体   English

部署商业桌面.NET应用程序有哪些选择?

[英]What are the options for deploying a commercial desktop .NET application?

There must be many other developers looking for a "good" method of deploying a .NET desktop application, where "good" means: 必须有许多其他开发人员在寻找部署.NET桌面应用程序的“好方法”,其中“好”是指:

  • Ease of installation for a trial user 试用用户易于安装
  • Reasonable download size (Not a 350 MB monstrosity) 合理的下载大小(不是350 MB的怪物大小)
  • Low cost of any purchased tool 购买任何工具的成本低
  • Targets Windows XP SP3, Windows Vista, Windows 7, etc. 定位到Windows XP SP3,Windows Vista,Windows 7等。

If a user has to jump through too many hoops, or the download takes too long, the user won't try the software and will never find out how great/useful it is. 如果用户不得不跳太多圈,或者下载时间太长,则用户将不会尝试该软件,也永远不会发现它的功能。 So this is the major consideration. 因此,这是主要考虑因素。

Other relevant factors: 其他相关因素:

  • Development environment: Visual Studio 2010 or 2008 (can switch) 开发环境:Visual Studio 2010或2008(可以切换)
  • Installation requirements are simple: nothing Visual Studio Installer can't handle. 安装要求很简单:Visual Studio Installer无法处理任何事情。
  • Learning curve: a walk-through of a similar .NET deployment is highly desirable. 学习曲线:非常需要逐步了解类似的.NET部署。
  • Although currently targeting .NET 2.0, targeting a later version of .NET (4.0 client profile?) without reboots (Windows Installer 3.1 install!) might be useful/desirable. 尽管当前的目标是.NET 2.0,但目标为.NET的更高版本(4.0客户端配置文件?)而无需重新启动(Windows Installer 3.1安装!)可能是有用/理想的。

As far as I can tell, all pure Microsoft approaches involve multiple files making for complex installation instructions (download X, Y, run X, tidy up). 据我所知,所有纯Microsoft方法都涉及制作多个文件,以进行复杂的安装说明(下载X,Y,运行X,整理)。

I don't remember the exact mechanics, but you can set your installer to download the .NET framework directly from Microsoft, rather than your own site, and only if it's not already installed. 我不记得确切的机制,但是您可以将安装程序设置为直接从Microsoft(而不是您自己的站点)下载.NET框架,前提是尚未安装。

Additionally, look into targeting the Client Profile, which is "only" 50 MB (still large, but better than 350 MB). 此外,请考虑以“客户端配置文件”为目标,“仅50 MB”(仍然很大,但比350 MB更好)。 Finally, Windows Vista and Windows 7 ship with .NET pre-installed, and Microsoft is using it in some of their own software, so penetration of the framework is actually pretty high. 最后,Windows Vista和Windows 7预先安装了.NET,而Microsoft正在其某些软件中使用它,因此该框架的普及率实际上很高。 It's much rarer these days for a user to need to install the framework along with your application, at least as long as you stick with 2.0 or 3.5. 如今,至少在您坚持使用2.0或3.5的情况下,用户需要将框架与应用程序一起安装,这已经很少见了。

If Windows Installer 3.1 or later and .NET framework is present in the target machine, creating an installer using Setup projects was a pretty straightforward experience for me. 如果目标计算机中存在Windows Installer 3.1或更高版本,并且.NET框架存在,那么使用安装程序项目创建安装程序对我来说是非常简单的体验。

The result is a single MSI file to download and run. 结果是下载并运行一个MSI文件。 You just add the project output to the setup project and you are good to go. 您只需将项目输出添加到设置项目中就可以了。

If you stick to .NET 2.0, I believe it was smaller than .NET 3.5 SP1. 如果您坚持使用.NET 2.0,我相信它比.NET 3.5 SP1小。

Another alternative is XCOPY . 另一个选择是XCOPY You compress the bin folder of the application and ask the user uncompress and run the application. 您压缩应用程序的bin文件夹,并要求用户解压缩并运行该应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM