如何禁用 ClickOnce(或至少禁用 Visual Studio 2010 Express 中的“您确定要安装此程序吗”窗​​口)

发布于 2024-09-27 00:41:57 字数 325 浏览 3 评论 0原文

我该如何创建一个不需要“发布者无法验证”窗口的应用程序?

如何在 EXE 文件中获取我的 Windows 窗体 应用程序,以便我只需单击它即可跑了,不要求我做任何事?也许可以通过禁用 ClickOnce 来完成此操作,但如何在 Visual Studio 2010 Express 中做到这一点?

How might I go about creating an application that does not need that "Publisher Cannot be verified" window?

How can I get my Windows Forms application in a EXE file so that I can just click it and it runs, not asking me to do anything? Maybe this can be done by disabling ClickOnce, but how can you do that in Visual Studio 2010 Express?

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

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

发布评论

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

评论(4

浮生面具三千个 2024-10-04 00:41:57

我认为没有人理解您的问题的原因是,唯一一次使用 ClickOnce 进行部署是在您使用“发布”向导时。

您要做的是:转到“构建”菜单 ->配置管理器->并将“活动解决方案配置”更改为发布。这将使 Visual Studio 优化您的代码。然后F6(构建解决方案)和您的基本可执行文件(.exe)将位于您的{projectDirectory}/bin/Release文件夹中,您将能够运行来自任何具有您编译的 .NET 框架的计算机。

I think the reason that no one understood your question is that the only time ClickOnce is used for deployment is when you use the "Publish" wizard.

What you're looking to do is: Go to the Build menu -> Configuration Manager -> and change the "Active solution configuration" to release. This will make Visual Studio optimise your code. Then F6 (Build Solution) and your basic exectutable (.exe) files will be in your {projectDirectory}/bin/Release folder, and you'll be able to run this from any computer that has the .NET framework you compiled in.

夏末染殇 2024-10-04 00:41:57

使用 ClickOnce 需要在浏览器中打开一个以“.application”结尾的链接,但听起来您只是从本地计算机启动一个普通的 EXE,因此我认为不涉及 ClickOnce。

您是否通过网络将文件复制到您的计算机上?右键单击该 EXE,打开“属性”,然后查看窗口底部是否有“取消阻止”按钮。如果是这样,请单击它。

“无法验证发布者”消息与代码签名相关。就像我上面说的,您应该能够告诉 Windows 不要对该文件如此严格,但如果您确实需要签名,您可以从 MSDN 的 代码签名简介

Using ClickOnce involves opening a link in a browser that ends in ".application", but it sounds like you're just launching a normal EXE from your local machine, so I don't think ClickOnce is involved.

Did you copy the file to your machine across a network? Right-click on the EXE, open Properties, and see if there's an "Unblock" button at the bottom of the window. If so, click it.

The "publisher cannot be verified" message relates to code signing. Like I said above, you should be able to tell Windows not to be so strict with that file, but if you really need to get signed, you could start with MSDN's Introduction to Code Signing.

勿忘初心 2024-10-04 00:41:57

出现该消息的原因是无法验证用于签署 ClickOnce XML 站点的证书。这些 MSDN 文章描述了该问题:

The message occurs because the certificate used to sign the ClickOnce XML site can not be verified. These MSDN articles describes the problem:

旧城烟雨 2024-10-04 00:41:57

您是否使用 ClickOnce 部署?除非您拥有受信任发行商的有效证书,并将其安装在用户的计算机上,否则您无法摆脱“未知发行商”窗口。

Are you using ClickOnce deployment? You can not get rid of the "Unknown publisher" window unless you have a valid certificate with a trusted publisher, and you install it on the user's machine.

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