Vous êtes sur la page 1sur 31

ClickOnce Publish

Chandrakant Kumar
14/04/2015

Pre-requisites & Assumptions

IIS
FTP
Signing Certificate

Assumption:
1. The guidelines mentioned in this document are as per the UI and features available in Visual
Studio 2013

ClickOnce
A ClickOnce is a publishing mechanism to publish applications like WPF, Windows Forms, console application, Office solution
published using ClickOnce technology.
We can publish aClickOnce application in three different ways:
From a Web page,
From a network file share, or
From media such as a CD-ROM.

AClickOnce application can be installed in two modes:


Online & Offline: Can be installed on an end user's computer and run locally even when the computer is offline
Online Only: can run in an online-only mode without permanently installing anything on the end user's computer.

ClickOnce applications can be self-updating: it can check for newer versions as they become available and automatically replace
any updated files.
The developer can specify the update behavior

Updates can also be rolled back to an earlier version by the end user or by an administrator.
Because ClickOnce applications are isolated, installing or running aClickOnce application cannot break existing applications.
ClickOnce applications are self-contained; each ClickOnce application is installed to and run from a secure per-user, per-application
cache. ClickOnce applications run in the Internet or Intranet security zones. If necessary, the application can request elevated
security permissions.

ClickOnce Publish Set up IIS

Create a WebSite in IIS


For example: TestSite
Physical Path of TestSite:
E:\IIS
Using ClickOnce required
files has to be pushed to this
location(E:\IIS)

ClickOnce Publish Creating Application


Create a new WPF Application(for
demonstration)

ClickOnce Signing

ClickOnce: Signing-Sign the ClickOnce manifest


Sign the ClickOnce manifest:
1. Make Sure that Sign the ClickOnce
manifest is checked.
2. There must be a valid certificate
available. The certificate must be valid in
terms of Expiration Date.
3. If there is no certificate, then select a
valid certificate by clicking on Select
from Store
4. There is a possibility that there is no
certificate available in store.
5. In case there is no certificate available in
store then create a valid certificate by
clicking on Create Test Certificate
6. Then go to Select from Store and select
the valid certificate which has been just
created.

ClickOnce: Signing-Sign the assembly


Sign the assembly:
1. Make sure that Sign the assembly is
checked
2. Now Choose a strong name key file from
the dropdown below Choose a strong
name key file:
3. If there is no key file2available then create a
new key file.

1. Enter the Key File Name


2. If desired to protect the key file
with password then check the
check box Protect my key file with
a password
3. Enter the password and confirm
password
4. If not required uncheck the
checkbox Protect my key file with
a password
5. Finally click on OK

ClickOnce: Publish

s
l
i
a
t
e
D
e
h
t
e
v
a
S

ClickOnce: Publish

ClickOnce: Publish-Publish Location


Publish Location:
There are two options for
Publish Location:
1. File System To extract the
deployable files in local
disk, then, the extracted
files has to be moved to
the location of installation
folder(URL).
2. FTP To upload the
deployable file to a FTP
site, preferably the
Physical path of Installation
URL
3. Installation URL is the URL
of hosted website from
where the installer will
launch.

ClickOnce: Publish-Publish Location

Enter the
credentials
of FTP to
upload
deployable
files

E:\IIS Publish Location and Physical path


of webSite hosted on local IIS

ClickOnce: Publish-Installation Folder URL


We can publish
aClickOnce application
in three different ways:

From a Web page,


From a network file share,
or
From media such as a
CD-ROM.

ClickOnce: Publish-Installation Folder URL


From a Web page

From a network
file share

From media such


as a CD-ROM

ClickOnce: Publish-Install mode and Settings


AClickOnce
application can be
installed in two
modes:

Online & Offline: Can


be installed on an end
user's computer and
run locally even when
the computer is offline
Online Only: can run in
an online-only mode
without permanently
installing anything on
the end user's
computer.

ClickOnce: Publish-Install mode and Settings/Application Files

Application Files contains all required file that has to


be extracted by the deployement package while
downloading/installing the application

ClickOnce: Publish-Install mode and Settings/Pre-requisites

ClickOnce: Publish-Install mode and Settings/Updates

ClickOnce: Publish-Install mode and Settings/Options

ClickOnce: Publish-Install mode and Settings/Options/Description

ClickOnce: Publish-Install mode and Settings/Options/Deployment

ClickOnce: Publish-Install mode and Settings/Options/Manifests

ClickOnce: Publish-Install mode and Settings/Options/File Associations

File Associations:
We have to specify the type of file to be associated with the application to launch.
In this example it is simple .exe file, so no need to specify the File Associations.
In case of ADK, the extension will be .adk, and provide the Icon

ClickOnce: Clean and Compile the Project &


Solution

s
l
i
a
t
e
D
e
h
t
e
v
a
S

ClickOnce: Publish

Click here to Publish


Or,
We can follow the Publish
Wizard also.

ClickOnce: Publish Wizard

1.
Launch
Publish
Wizard

4.
Mode of installation

2.
Publish Location E:\IIS

5.
Ready to Publish

3.
http://localhost/TestSite/

ClickOnce: Ready to Publish

s
l
i
a
t
e
D
e
h
t
e
v
a
S

ClickOnce: Publish

Once the completion of publish, using


installation URL the application can be
Installed

ClickOnce Signing

1.
Click on
Run

URL
http://ge-502423194/TestSite/publish.htm

2.
Installing and Launcing
Application

3.
Application

ClickOnce Signing

1. The application can also be launched from


Start Menu and Desktop shortcut.
2. If there is any update available the application
will install the update on User confirmation
while launching(according to setting configured
for updates)

Thank You

Vous aimerez peut-être aussi