WPF和ClickOnce [英] WPF and ClickOnce

查看:183
本文介绍了WPF和ClickOnce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MSDN并未将WPF .exe列为ClickOnce的受支持应用程序类型

MSDN does not list a WPF .exe as a supported type of application for ClickOnce


ClickOnce应用程序是任何Windows Presentation Foundation
(.xbap),Windows窗体(.exe),控制台应用程序(.exe)或使用ClickOnce技术发布的Office
解决方案(.dll)。

A ClickOnce application is any Windows Presentation Foundation (.xbap), Windows Forms (.exe), console application (.exe), or Office solution (.dll) published using ClickOnce technology.

http://msdn.microsoft.com/zh-CN /library/t71a733d.aspx

我确实在网络上发现非XBAP WPF应用程序可与ClickOnce一起使用的证据,但它们得到正式支持吗?

I do find evidence around the web that non-XBAP WPF apps work with ClickOnce, but are they officially supported?

推荐答案

是的,ClickOnce支持将WPF应用程序编译为可执行文件。 ClickOnce仅仅是一种安装分发方法。创建安装包和ClickOnce(不是基于Web的)的主要区别在于,ClickOnce应用程序安装在最终用户Windows目录内的混淆文件夹中。

Yes, ClickOnce does support WPF applications compiled to executables. ClickOnce is nothing more than an installation distribution method. The primary difference between creating an installation package and ClickOnce (other than being web-based) is that ClickOnce applications are installed within obfuscated folders within the end user's Windows directory.

表示可以使用非管理员帐户安装ClickOnce应用程序。需要注意的是,该方法不能将应用程序安装在PC上并不能与PC上的其他用户帐户共享-每个用户都必须重新安装该应用程序。

The means that ClickOnce applications can be installed with a non-administrator account. The caveat to this method is that an application can not be installed on a PC and shared across other user accounts on the PC-- each user must re-install the application.

WPF需要.NET 3.0+框架。发布ClickOnce应用程序时,您将需要包括.NET 3.0(或4.0)框架。将前提条件添加到项目后,ClickOnce将检查用户的PC以查看是否已安装框架。如果没有,它将在安装和运行您的应用程序之前预安装它。如果已经存在,它将跳过该框架的下载和安装。

WPF requires the .NET 3.0+ framework. When you publish your ClickOnce application, you will need to include the .NET 3.0 (or 4.0) framework. Once you add the prerequisite to your project, ClickOnce will check the user's PC to see if the framework is installed. If not, it will pre-install it before installing and running your application. If it already exists, it will skip the download and installation of the framework.

如果您需要安装第三方库或应用程序,则可以自定义先决条件创建并添加到您的项目中。值得注意的是,取决于最终用户的权限,管理员可能需要安装先决条件。这似乎有点违反直觉,但这只是安装过程的本质。

If you need to install a third-party library or application, custom pre-requisites can be created and added to your projects. It is worth noting, prerequisites may need to be installed by an administrator, depending on the rights of the end user. This may seem a bit counter-intuitive, but it's just the nature of the installation process.

ClickOnce是一种非常简单但功能强大的安装机制,我使用过它广泛。这并不适合每种情况,但可以满足您的要求。

ClickOnce is a very simple, but robust installation mechanism, and I've used it extensively. It's not appropriate for every circumstance, but it can certainly accomplish what you are asking.

这篇关于WPF和ClickOnce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆