如何制作安装程序?对于 asp.net mvc 2.0、cmd 行应用程序和 Web 服务

发布于 2024-09-24 21:55:14 字数 801 浏览 2 评论 0原文

我想知道如何为每个项目创建一个安装项目

  • Asp.net mvc 2.0
  • C# cmd line
  • Application C# web-service

我正在使用 VS 2010 Ultimate,我知道我可以使用免费版的安装盾至少是命令行应用程序。我不确定其他 2 个。我也知道您可以使用的安装项目。我只需要比基础知识更多的东西,所以我不知道如何让任何一个人做这些事情。

因此,这是我的每个设置都应该能够达到的一些标准。

Asp.net mvc 2.0 标准

  1. 免费(我真的不想为安装程序付费 - 您可以列出它们,以便我了解它们)。
  2. 服务条款
  3. 能够强制用户设置某些设置。如连接字符串、smtp 设置。因此,他们应该能够通过设置向导输入它,并且 web.config 应该基于此进行更新。
  4. 当它安装这些东西时,所有 C# 代码都应该是 .dll。

C# cmd 行标准

  1. 如上所述的所有标准
  2. 我不确定这是否必须在代码中完成,但我有一个包含消息模板的 html 文件。该文件的路径位于 web.config 中,因此我需要在每次安装时设置此路径。我尝试在代码中执行此操作,但我不知道如何让它在开发中找到正确的路径,在生产中找到正确的路径。看起来如果你在 VS 中运行,路径是不同的。

网络服务

几乎是我在前两个内容中介绍的所有内容。

谢谢

I am wondering how can I make a setup project for each of these projects

  • Asp.net mvc 2.0
  • C# cmd line
  • Application C# web-service

I am using VS 2010 ultimate and I know that I can use the the free edition of install shield for at least the cmd line application. I am not sure about the other 2. I also know about the setup project that you can use. I just need a lot more than the basics so I am not sure how to make either one do these things.

So here is some criteria that each of my setups should be able to do.

Asp.net mvc 2.0 criteria

  1. free (I really don't want to pay for an installer - you can list them just so I am aware of them).
  2. Terms of service
  3. Ability to force a user to setup certain settings. Like connection string, smtp settings. So they should be able to type it in through the setup wizard and the web.config should be updated based on this.
  4. When it installs the stuff it should all be .dlls for all the C# code.

C# cmd line criteria

  1. All criteria as above
  2. I am not sure if this has to be done in the code but I have a html file that contains a template for a message. The path to this file is in the web.config so I a person needs to set this path each time they install it. I tried to do this in code but I could not figure out how to make it find the right path in development and the right path in production. It seems like If you run in VS the path is different.

Web-service

Pretty much everything I covered in the first 2 ones.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我一直都在从未离去 2024-10-01 21:55:14

如果我是您,我会选择 WiX 作为所有这些应用程序的安装程序的平台。这背后的一些原因是:

  • 它是基于 XML 的,也就是说,对源代码控制、比较和合并很友好,
  • 它为您可能需要的大多数场景(收集大量文件、创建升级和补丁、创建多语言)提供了丰富的工具集。安装等)
  • 它是免费和开源的
  • 它是生产就绪的(至少,版本 3.0 - 更高版本仍处于测试阶段)
  • 它被 Microsoft 用于为 MS Office 等产品创建安装
  • 它在< a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b4c3ddcc99c1c7d1c6c7f4d8ddc7c0c79ac7dbc1c6d7d1d2dbc6d3d19adad1c0">[email protected] 和 StackOverflow
  • 它像魅力一样集成到 VS 中,
  • 它很友好构建像 NAnt 和 MSBuild

VS 安装项目这样的引擎不是我的选择,因为:

不过,我对 InstallShield Limited 版本不熟悉。

希望本概述能帮助您找到适合您情况的最佳选择。

If I were you, I would choose WiX as a platform for your installers for all these applications. Some reasoning behind this:

  • it is XML-based, that is, friendly to source control, diffing and merging
  • it has rich set of tools for most of scenarios you might need (harvesting lots of files, creating upgrades and patches, creating multi-lingual installs, etc.)
  • it is free and open source
  • it is production-ready (at least, version 3.0 - later versions are still in beta)
  • it is used by Microsoft to create installations for such products like MS Office
  • it has rich community at [email protected] and StackOverflow
  • it integrates into the VS like a charm
  • it is friendly to build engines like NAnt and MSBuild

VS setup project is not my choice because:

  • it is very limited in set of features-
  • it encourages bad practices like Installer classes
  • finally, it was retired by Microsoft

I'm not familiar with InstallShield Limited edition, though.

Hope this overview will help you finding the best option for your case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文