.net ClickOnce 有哪些替代方案?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/623418/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:17:09  来源:igfitidea点击:

What alternatives are there to ClickOnce?

.netwixclickonceweb-deployment

提问by ScottB

I've used ClickOncea lot over the years, but I have run up against a lot of its limitations. What alternatives are there for web deployment?

多年来,我经常使用ClickOnce,但我遇到了它的许多限制。Web 部署有哪些替代方案?

So far the only one I've been able to turn up is ClickThrough, which is part of WiXnow on the back burner. Are there others that have had success?

到目前为止,我唯一能够打开的是ClickThrough,它现在是WiX 的一部分。有没有其他人取得成功?

采纳答案by Mark

After using WiX, NSIS and InstallAware, I have to humbly admit that they were all overkill for what I really need as a software developer. There are no projects that I've done so far which couldn't be deployed using the Visual Studio deployment project.

在使用了 WiX、NSIS 和 InstallAware 之后,我不得不谦虚地承认,对于我作为软件开发人员真正需要的东西来说,它们都太过分了。到目前为止,我完成的任何项目都无法使用 Visual Studio 部署项目进行部署。

Is it limited? Yes.

有限制吗?是的。

It is also verysimple to learn and use. Moreover, you canactually do really neat things like automatically create patches(.MSP files) by using techniques as described here

学习和使用也非常简单。此外,您实际上可以使用此处描述的技术来做一些非常巧妙的事情,例如自动创建补丁(.MSP 文件)

I fully understand that you can't do everythinginside of a Visual Studio setup project, but it's rather surprising what you canaccomplish. It's free, it's easy and, frankly, for general use is a better option than spending endless hours learning WiX's mind-boggling XML (impressive as it is), or InstallAware's verbose scripts.

我完全理解您无法在 Visual Studio 安装项目中完成所有工作,但您可以完成的工作令人惊讶。它是免费的,很容易,坦率地说,对于一般用途来说,这是一个比花费无数时间学习 WiX 令人难以置信的 XML(令人印象深刻)或 InstallAware 的冗长脚本更好的选择。

With VS Setup, it's drag'n'drop & build'n'deploy. Every other solution I've tried had set backs... they can't automatically detect your project output... or need special filters so as not to include unwanted outputs from the build.

使用 VS 安装程序,它是“拖放”和“构建”和“部署”。我尝试过的所有其他解决方案都遇到了挫折……它们无法自动检测您的项目输出……或者需要特殊的过滤器以免包含构建中不需要的输出。

My suggestion is thus: If you simply wish to get your project deployed, then learn:

我的建议是:如果您只是希望部署您的项目,那么学习:

  1. How to build a custom installer class, and
  2. How to author your own pre-requisite packages
  1. 如何构建自定义安装程序类,以及
  2. 如何编写自己的先决条件包

These are both reasonably easy skills to master, and satisfy the needs of most developers.

这些都是相当容易掌握的技能,并且可以满足大多数开发人员的需求。

回答by kimsagro

Squirrel: It's like ClickOnce, but it works.

Squirrel:就像 ClickOnce,但它有效。

Squirrel is both a set of tools and a library, to completely manage both installation and updating your desktop Windows application, written in either C# or any other language (that is, Squirrel can manage native C++ applications).

Squirrel 既是一组工具又是一个库,用于完全管理桌面 Windows 应用程序的安装和更新,使用 C# 或任何其他语言编写(即,Squirrel 可以管理本机 C++ 应用程序)。

Squirrel uses NuGetpackages to create installation and update packages, which means that you probably already know most of what you need to create an installer.

Squirrel 使用NuGet包来创建安装和更新包,这意味着您可能已经知道创建安装程序所需的大部分内容。

回答by TFD

What limitations are you experiencing with ClickOnce? When I don't use ClickOnce, I use NSIS(though you could use most other installer languages/systems) to make a runnable, self-installing application.

您在使用 ClickOnce 时遇到了哪些限制?当我不使用 ClickOnce 时,我使用NSIS(尽管您可以使用大多数其他安装程序语言/系统)来制作可运行的自安装应用程序。

That is, when you run the download it is running the application, and there aren't any setup questions. There is a menu option, or a frequent-use detector that allows for permanent installation.

也就是说,当您运行下载时,它正在运行应用程序,并且没有任何设置问题。有一个菜单选项,或一个允许永久安装的常用检测器。

The two hard issues are:

两个棘手的问题是:

  1. Settings files
  2. Local registry settings
  1. 设置文件
  2. 本地注册表设置

For settings files, I use a remote web service to hold states, etc.

对于设置文件,我使用远程 Web 服务来保存状态等。

If you need local registry settings (file associations, etc.) then you need to do a proper install, but this can be done silently when the user is working with the application for the first time.

如果您需要本地注册表设置(文件关联等),那么您需要进行正确的安装,但这可以在用户第一次使用应用程序时静默完成。

回答by Daniel

Check this out http://simpldeploy.comIt‘s similar to squirrel but integrated into VS like ClickOnce. And it has Dialogs (optional) like ClickOnce.

看看这个 http://simpldeploy.com它类似于松鼠,但像 ClickOnce 一样集成到 VS 中。它有像 ClickOnce 这样的对话框(可选)。