When you build a XBAP, the Microsoft
build engine (MSBuild) produces the following three files as a minimum:
An executable file. This contains
the compiled code and has an .exe extension.
An application manifest. This
contains metadata associated with the application and has a .manifest
extension.
A deployment manifest. This file
contains the information that ClickOnce uses to deploy the application and has
an .xbap extension.
We can publish the XBAPs
to a web server like IIS. We do not need to install .NET Framework in the web
server. But you do need to register the WPF
Multipurpose Internet Mail Extensions (MIME) types and file extensions.
These are some MIME types which needs to be registered.
MIME Type
|
Extension
|
application/manifest
|
.manifest
|
application/x-ms-xbap
|
.xbap
|
application/octet-stream
|
.deploy
|
application/x-ms-application
|
.application
|
application/vnd.ms-xpsdocument
|
.xps
|
application/xaml+xml
|
.xaml
|
To prepare your XBAP for
deployment, copy the .exe and the associated manifests to your Web server.
Create a hyperlink on a Web page to navigate to the deployment manifest. When
the user clicks the link and navigates to the .xbap file, ClickOnce
automatically handles the mechanics of downloading and launching the
application.
Clearing Cached XBAPs
In some situations after rebuilding and launching your XBAP,
you may find that a previous version of the XBAP is launched. This may happen,
for example, when your XBAP assembly version number is static and you launch
the XBAP from the command line. In this case, because the version number
between the cached version (the version that was previously launched) and the
new version remains the same, the new version of the XBAP is not downloaded;
instead, the cached version is loaded.
In these situations, you can remove the cached version by
using the Mage command
(installed with the Windows SDK) from the command prompt:
Mage.exe -cc
This ensures that the latest version of your XBAP is
launched, because a cached version can't be found. If you debug using Visual
Studio 2005, by pressing F5, the latest version of your XBAP should be
launched.
In general, you should update your assembly version number
with each build.