公共“点击一次”应用

发布于 2024-11-25 09:19:31 字数 209 浏览 0 评论 0原文

正如标题所示,我想通过 Visual Studio 的发布向导创建并公开我的应用程序。然而,我遇到了一个问题。似乎通过发布我的应用程序 VS 迫使我创建一个安装程序。问题是我不想安装我的应用程序!我希望我的应用程序成为一个“正常”的单击一次可执行文件,通常在我选择不发布我的项目时生成。我希望能够从任何目录复制并运行此应用程序,而不必安装它(根本)。

我希望这是可能的。非常感谢您的帮助。

As the title suggests, I would like to create - and public - my application through Visual Studio's Publish Wizard. I am running into an issue, however. It seems as though by publishing my application VS is forcing me to create an installer. The problem is that I do not want my application to have to install! I would like for my application to be a "normal" click-once executable that is usually produced when I choose not to publish my project. I want to be able to copy and run this application from any directory and not have to install it (at all).

I hope this is even possible. Thank you very much for any help.

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

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

发布评论

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

评论(2

迷爱 2024-12-02 09:19:31

那么,ClickOnce 应用程序的定义是允许您通过单击来安装它(因此得名)。然后,它将安装到应用程序缓存中,并且只能通过在线激活运行,或者通过“开始”菜单快捷方式离线运行。如果仅从在线激活 ClickOnce 应用程序,则在发布 ClickOnce 应用程序时不必包含安装程序。

如果您想要的只是一个无需安装即可运行的可执行文件,我建议将其作为构建的一部分进行压缩并发布。

Well, the definition of a ClickOnce application is to allow you to install it with a single click (hence the name). It is then installed into the Application Cache, and either run only from online activation, or offline via a Start Menu shortcut. You don't have to include the installer when publishing the ClickOnce application if it will be activated from online only.

If all you want is an executable that can be run with no installation what-so-ever, I'd suggest just zipping it up as part of your build and publishing that.

红衣飘飘貌似仙 2024-12-02 09:19:31

我认为您想要的是“仅限在线”选项。如果您在项目属性中选择该选项,它仍然会安装在用户的计算机上(总是如此),但它不会显示在添加/删除程序中,并且用户必须从网站上的链接运行它-- 桌面上不会有任何快捷方式。

请注意,setup.exe 本身并不是安装程序。它是引导程序。它检查是否安装了先决条件,如果安装了,它就会启动 ClickOnce 应用程序。如果不是,则会安装它们,然后启动 ClickOnce 应用程序。

如果您知道先决条件已安装,则可以为用户提供指向 .application 文件本身的链接 - 这就是所谓的“仅执行 ClickOnce 安装本身”。

I think what you think you want is the "online-only" option. If you select that option in the Project properties, it will still install on the user's machine (it always does), but it won't show up in add/remove programs, and the user has to run it from a link on a website -- there won't be any shortcut on the desktop.

Note that the setup.exe is not an installer per se. It is the bootstrapper. It checks to see if the prerequisites are installed, and if they are, it fires off the ClickOnce application. If they aren't, it installs them, and THEN fires off the ClickOnce application.

If you know the prerequisites are installed, you can give your users a link to the .application file itself -- this is what is called just to do the ClickOnce installation itself.

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