Your SlideShare is downloading. ×
By Suthep Sangvirotjanaphat
GreatFriends.Biz Founder and Microsoft MVP
 Look Once to ClickOnce
   How ClickOnce Works
   Code: Get general information of current deployment
 AutoUpdate Manu...
 Code in VB
   My.Application.Deployment
 Code in C#
   ApplicationDeployment class
        in namespace System.Deploy...
A brief understanding to ClickOnce deployment
as a very important feature of a .NET 2.0 smart client.


                  ...
Good!
  I don’t worry
about deployment
    any more.




                                                             Good...
 Project Properties  Tab Publish
 We have 3 Locations
   Publishing
   Installation
   Update
 Settings
   Applica...
 Is this a ClickOnce deployed application?
   My.Application.IsNetworkDeployed (Boolean)


 Code to get general informa...
Have a deep understanding about the update process,
and take control to the AutoUpdate feature.


                   http:...
 Check before or after
  program starts
 Scheduling
  check for update
 Minimum
  required version.




               ...
 Code to check for update
   My.Application.Deployment.CheckForUpdate() (Boolean)
   My.Application.Deployment.CheckFor...
Download and install a small core module first quicker,
then download and install other add-in modules as need later.


  ...
 Click Application Files button in Publish pane
 Set optional files to Include, Not Include (Auto),
  and set it to a sp...
 Code to check whether file group is already downloaded.
   My.Application.Deployment.IsFileGroupDownloaded(group)
    (...
 The ApplicationDeployment events.
   CheckForUpdateCompleted
   CheckForUpdateProgressChanged


   DownloadFileGroupC...
How to store data for a ClickOnce application?
It’ll lost after automatically update or not?


                    http://...
 We can get directory for store data
  that persist for ClickOnce application
   My.Application.Deployment.DataDirectory...
 ClickOnce makes Smart Clients come true.
 Typically ClickOnce does not need special
    configuration and coding.
   W...
 Article - Smart Clients: Windows Application for the Future
  http://greatfriends.biz?29995
 ขนตอนการ ทา Setup แบบ Clic...
Upcoming SlideShare
Loading in...5
×

Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz

7,992

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,992
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz"

  1. 1. By Suthep Sangvirotjanaphat GreatFriends.Biz Founder and Microsoft MVP
  2. 2.  Look Once to ClickOnce  How ClickOnce Works  Code: Get general information of current deployment  AutoUpdate Manually  Code: Check for Update  Code: Download and install new version  Code: Restart the application  Partially Deployment  ClickOnce Data Files http://GreatFriends.Biz (c) Suthep S. 2
  3. 3.  Code in VB  My.Application.Deployment  Code in C#  ApplicationDeployment class in namespace System.Deployment.Application [VB] Dim v As Version v = My.Application.Deployment.CurrentVersion [C#] using System.Deployment.Application; Version v = ApplicationDeployment.CurrentVersion; http://GreatFriends.Biz (c) Suthep S. 3
  4. 4. A brief understanding to ClickOnce deployment as a very important feature of a .NET 2.0 smart client. http://GreatFriends.Biz (c) Suthep S. 4
  5. 5. Good! I don’t worry about deployment any more. Good! It’s smart! http://GreatFriends.Biz (c) Suthep S. 5
  6. 6.  Project Properties  Tab Publish  We have 3 Locations  Publishing  Installation  Update  Settings  Application Files  Prerequisites  Updates  Options http://GreatFriends.Biz (c) Suthep S. 6
  7. 7.  Is this a ClickOnce deployed application?  My.Application.IsNetworkDeployed (Boolean)  Code to get general information about current deployment  My.Application.Deployment (ApplicationDeployment)  CurrentVersion (Version)  UpdatedVersion (Version)  TimeOfLastUpdateCheck (Date)  DataDirectory (String)  IsFirstRun (Boolean)  UpdateLocation (Uri) http://GreatFriends.Biz (c) Suthep S. 7
  8. 8. Have a deep understanding about the update process, and take control to the AutoUpdate feature. http://GreatFriends.Biz (c) Suthep S. 8
  9. 9.  Check before or after program starts  Scheduling check for update  Minimum required version. http://GreatFriends.Biz (c) Suthep S. 9
  10. 10.  Code to check for update  My.Application.Deployment.CheckForUpdate() (Boolean)  My.Application.Deployment.CheckForUpdateAsync()  My.Application.Deployment.CheckForUpdateAsyncCancel()  Code to download and install newer version  My.Application.Deployment.Update()  My.Application.Deployment.UpdateAsync()  Code to restart the application  System.Windows.Forms.Application.Restart() http://GreatFriends.Biz (c) Suthep S. 10
  11. 11. Download and install a small core module first quicker, then download and install other add-in modules as need later. http://GreatFriends.Biz (c) Suthep S. 11
  12. 12.  Click Application Files button in Publish pane  Set optional files to Include, Not Include (Auto), and set it to a specific Download Group. http://GreatFriends.Biz (c) Suthep S. 12
  13. 13.  Code to check whether file group is already downloaded.  My.Application.Deployment.IsFileGroupDownloaded(group) (returns Boolean)  Code to download a file group  My.Application.Deployment.DownloadFileGroup(group)  My.Application.Deployment.DownloadFileGroupAsync(group)  My.Application.Deployment.DownloadFileGroupAsyncCancel() http://GreatFriends.Biz (c) Suthep S. 13
  14. 14.  The ApplicationDeployment events.  CheckForUpdateCompleted  CheckForUpdateProgressChanged  DownloadFileGroupCompleted  DownloadFileGroupProgressChanged  UpdateCompleted  UpdateProgressChanged http://GreatFriends.Biz (c) Suthep S. 14
  15. 15. How to store data for a ClickOnce application? It’ll lost after automatically update or not? http://GreatFriends.Biz (c) Suthep S. 15
  16. 16.  We can get directory for store data that persist for ClickOnce application  My.Application.Deployment.DataDirectory (String)  Other means to DataDirectory  AppDomain.CurrentDomain.GetData(“DataDirectory”)  System.Windows.Forms.Application.LocalUserAppDataPath http://GreatFriends.Biz (c) Suthep S. 16
  17. 17.  ClickOnce makes Smart Clients come true.  Typically ClickOnce does not need special configuration and coding.  We can manually check for update and automatically install the new version  We can download ClickOnce partially at any time.  We should think about Data files  We have GUI utility named as MAGE  What we don’t covered: Security, Associate File Extension, Using MAGE, Custom Prerequisites, and other more advanced topics . http://GreatFriends.Biz (c) Suthep S. 21
  18. 18.  Article - Smart Clients: Windows Application for the Future http://greatfriends.biz?29995  ขนตอนการ ทา Setup แบบ ClickOnce ั้ http://greatfriends.biz?22612  บทความ - VB.NET Isolated Storage http://greatfriends.biz?30793  Deploying .NET Applications Learning MSBuild and ClickOnce Apress Publishing. Written by: Sayed Y. Hashimi ISBN: 1-59059-652-8 (280 p) http://GreatFriends.Biz (c) Suthep S. 22

×