Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting Up Continuous Deployment of a WPF Desktop Application

For a project I am currently working on, I need to create a setup application for an existing desktop application. The setup application will be downloaded from a website, and will download required files to the correct locations. When the application is started, it will look for newer versions of these files, download them if any exist, then start the application.

I am using Visual Studio Online with TFVC, linked to Azure. I have a test application set up so that when I trigger a build, Release Management finds the build directory, and moves the files to Azure Blob Storage, but prepends a GUID to the file names being transferred. So what I have in my storage container is:

{Some GUID}/2390/Test.exe
{Some GUID}/2389/Test.exe
{Some GUID}/2387/Test.exe
...

What I want in my container is the latest version of Test.exe, so I can connect to the container, and determine whether I want to download or not.

I have put together a NullSoft installer that checks a website, and downloads files. I have also written a NullSoft "launcher" that will compare local file versions with versions on the website (using a version xml file on the website), and download if newer, then launch the application. What I need to figure out is how to get the newer files to the website after a build, with automation being one of the goals.

I am an intern, and new to deployment in general, and I don't even know if I'm going about this the right way.

Questions:

  • Does what I am doing make sense for what I am trying to accomplish?
  • We are trying to emulate ClickOnce functionality, but can't use ClickOnce due to the fact that the application dynamically loads a number of DLLs. Is there a way to configure ClickOnce to include non-referenced DLLs?
  • Is there a best practice for doing what I'm describing?

I appreciate any advice, links to references, or real-world examples.

like image 720
Max Hampton Avatar asked Jan 19 '15 18:01

Max Hampton


People also ask

How do I distribute WPF application?

First, you have to have to install the Click-Once publishing tools using the Visual Studio installer. In the installer components tab search for Click Once. Then, you should be able to access the publishing option by selecting your project, right-click and choose Publish or using the Menu Build > Publish .

Is WPF still relevant 2021?

WPF is still one of the most used app frameworks in use on Windows (right behind WinForms).


1 Answers

You are mentioning ClickOnce, which you investigated but can't use. Have you already tried an alternative: Squirrel? With Squirrel you can specify which files should be part of the installation, allowing you to explicitly specify which files to include even if you load them dynamically.

Link: https://github.com/Squirrel/Squirrel.Windows

Squirrel is a full framework for creating an auto-update application and can work with Azure Blob Storage hosting (and also CDN if you need to scale up)

like image 77
Henry Been Avatar answered Oct 18 '22 03:10

Henry Been