WPF and ClickOnce

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

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

http://msdn.microsoft.com/en-us/library/t71a733d.aspx

On the Internet, I found that non-XBAP WPF applications work with ClickOnce, but are they officially supported?

+6
source share
2 answers

Yes, ClickOnce supports WPF applications compiled for executable files. ClickOnce is nothing more than a distribution method for an installation. The main difference between creating the installation package and ClickOnce (except for the web interface) is that ClickOnce applications are installed in obfuscated folders in the Windows directory of the end user.

This means that ClickOnce applications can be installed with an account without an administrator. The caveat to this method is that the application cannot be installed on the PC and is shared by other user accounts on the PC - each user must reinstall the application.

WPF requires .Net 3.0+ framework. When you publish the ClickOnce application, you need to enable the .Net 3.0 (or 4.0) framework. After you add the prerequisite to your project, ClickOnce will check the user's computer to see if the infrastructure is installed. If not, it will pre-install it before installing and running the application. If it already exists, it will skip downloading and installing the framework.

If you need to install a third-party library or application, user pre-requisites can be created and added to your projects. It should be noted that depending on the rights of the end user, some prerequisites for the administrator may be required. This may seem a bit controversial, but it's just the nature of the installation process.

ClickOnce is a very simple but reliable installation mechanism, and I have used it extensively. This is not suitable for any circumstances, but it certainly can fulfill what you ask.

+9
source

For ClickOnce, there is no difference between the Windows Forms executable and the WPF executable, both are .NET executables and as such are fully supported by ClickOnce ...

I personally deployed several working WPF applications using ClickOnce, and it worked just like with my Winforms applications ...

+1
source

Source: https://habr.com/ru/post/906597/


All Articles