10: Deploying Applications Using The Prism Library 5.0 For WPF
10: Deploying Applications Using The Prism Library 5.0 For WPF
client computer will not get the module files. To address this, you must modify the
application manifest to include the module files that are not referenced by the shell
application project.
ClickOnce Publishing Process
You can publish ClickOnce applications from Visual Studio 2013 using the Windows
Software Development Kit (SDK) tool named the Manifest Generating and Editing
tool (Mage) or a custom tool that uses the ClickOnce publishing APIs. Visual Studio
exposes most of the capabilities needed for ClickOnce publishing. However, Visual
Studio may not be available or desired for IT administrators who manage ClickOnce
deployments on the server. Mage is designed to address most common
administrative tasks for ClickOnce; it is a lightweight .NET Framework Windowsbased application that can be given to your administrators. However, Mage requires
too many detailed steps, performed in the correct order, to successfully complete
common tasks such as modifying the application files listed in the application
manifest. To make these tasks simpler, a custom utility is needed.
The Manifest Manager Utility sample utility demonstrates how to use the ClickOnce
publishing API to manage deployment and application manifests in a simpler way.
This utility is used for updating application manifest file lists and deployment
manifest settings in a single user interface (UI) and its use is described in later
sections in this topic for initial deployment and update of a Prism application. The
Manifest Manager Utility uses APIs exposed in the
Microsoft.Build.Tasks.Deployment namespace to load, manipulate, and save
modified manifest files for a ClickOnce deployment. You can download the Manifest
Manager Utility from the Prism community site on Codeplex. at
http://compositewpf.codeplex.com/releases/view/14771. To learn the specific steps
involved in publishing and updating a WPF Prism application that uses dynamic
module loading, see the WPF Prism Deployment Hands-On Lab: Publishing and
Updating with ClickOnce.
The following illustration shows the typical structure for a ClickOnce application
publication, based on the way Visual Studio generates the deployment folders when
you publish an application with ClickOnce. It includes a root folder for the
application, which contains the default deployment manifest (.application file). The
default deployment manifest usually points to the most recently published version
when generated by Visual Studio, but it can be changed to point to whichever
version the administrator chooses. The root folder also contains the Setup.exe
bootstrapper, which allows you to deploy prerequisites for your application that
might require an installer or executable to run before deploying the application
using ClickOnce. There is then a subfolder for the application-specific files, under
which you get a separate subfolder for each version that you publish. The publish
version is a separate project setting and entry in the deployment manifest file for
versioning the deployment as a whole, as opposed to the individual assembly
versions of the contained assemblies. The publish version is used by ClickOnce to
determine when there is an update available from a client that has already installed
a ClickOnce application.
It includes the application files themselves, usually with a .deploy file name
extension appended to the file name to simplify mapping these files to MIME types
on the deployment server. ClickOnce automatically strips off the .deploy file name
extension on the client side after the file is downloaded.
ClickOnce Deployment and Update Process
The actual deployment of the application to a user via ClickOnce is almost always
initiated by providing a URL or hyperlink to the deployment manifest of your
published application on the deployment server. The user can click the hyperlink or
enter the address in a browser, and the ClickOnce deployment process is invoked.
After the manifest and application files are downloaded to the client computer, the
application is launched. There are ClickOnce options that allow you to install the
application during the initial deployment for offline use, or you can require the user
to launch the application using the link or URL every time. When you publish a new
version of the application to the deployment server, ClickOnce can automatically or
manually check for updates and will download and apply the update for the next
time the application launches.
More Information
You can download the Manifest Manager Utility from the Prism community site on
Codeplex.
To download the Manifest Manager Utility from the Prism community site on
Codeplex at http://compositewpf.codeplex.com/releases/view/14771.
To learn the specific steps involved in publishing and updating a WPF Prism
application that uses dynamic module loading, see the Publishing and Updating
Applications Using the Prism Library Hands-on Lab.