SlideShare a Scribd company logo
1 of 18
By Suthep Sangvirotjanaphat
GreatFriends.Biz Founder and Microsoft MVP
 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
 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
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
Good!
  I don’t worry
about deployment
    any more.




                                                             Good!
                                                              It’s
                                                             smart!




                   http://GreatFriends.Biz   (c) Suthep S.            5
 Project Properties  Tab Publish
 We have 3 Locations
   Publishing
   Installation
   Update
 Settings
   Application Files
   Prerequisites
   Updates
   Options



                        http://GreatFriends.Biz   (c) Suthep S.   6
 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
Have a deep understanding about the update process,
and take control to the AutoUpdate feature.


                   http://GreatFriends.Biz   (c) Suthep S.   8
 Check before or after
  program starts
 Scheduling
  check for update
 Minimum
  required version.




                      http://GreatFriends.Biz   (c) Suthep S.   9
 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
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
 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
 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
 The ApplicationDeployment events.
   CheckForUpdateCompleted
   CheckForUpdateProgressChanged


   DownloadFileGroupCompleted
   DownloadFileGroupProgressChanged


   UpdateCompleted
   UpdateProgressChanged




                   http://GreatFriends.Biz   (c) Suthep S.   14
How to store data for a ClickOnce application?
It’ll lost after automatically update or not?


                    http://GreatFriends.Biz   (c) Suthep S.   15
 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
 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
 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

More Related Content

What's hot

Integrate Flex With Spring Framework
Integrate Flex With Spring FrameworkIntegrate Flex With Spring Framework
Integrate Flex With Spring Framework
Guo Albert
 

What's hot (20)

Vaadin codemotion 2014
Vaadin codemotion 2014Vaadin codemotion 2014
Vaadin codemotion 2014
 
March 2018 Patch Tuesday Ivanti
March 2018 Patch Tuesday IvantiMarch 2018 Patch Tuesday Ivanti
March 2018 Patch Tuesday Ivanti
 
Vaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenVaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas Lehtinen
 
7 must have word press plugins for web developers
7 must have word press plugins for web developers7 must have word press plugins for web developers
7 must have word press plugins for web developers
 
Prerequisites
PrerequisitesPrerequisites
Prerequisites
 
Vaadin NYC Meetup
Vaadin NYC MeetupVaadin NYC Meetup
Vaadin NYC Meetup
 
Patch Tuesday Analysis - September 2015
Patch Tuesday Analysis - September 2015Patch Tuesday Analysis - September 2015
Patch Tuesday Analysis - September 2015
 
Wordpress Customization
Wordpress CustomizationWordpress Customization
Wordpress Customization
 
Microsoft Lync Server 2010 Installation
Microsoft Lync Server 2010 InstallationMicrosoft Lync Server 2010 Installation
Microsoft Lync Server 2010 Installation
 
Patch Tuesday Analysis - August 2015
Patch Tuesday Analysis - August 2015Patch Tuesday Analysis - August 2015
Patch Tuesday Analysis - August 2015
 
BeEF
BeEFBeEF
BeEF
 
Php development company
Php development companyPhp development company
Php development company
 
Microsoft Tech Ed 2006 #2
Microsoft Tech Ed 2006 #2Microsoft Tech Ed 2006 #2
Microsoft Tech Ed 2006 #2
 
Mobile Commerce ppt....... Provides a website interface to the customers to b...
Mobile Commerce ppt....... Provides a website interface to the customers to b...Mobile Commerce ppt....... Provides a website interface to the customers to b...
Mobile Commerce ppt....... Provides a website interface to the customers to b...
 
Microsoft Tech Ed 2006 #1
Microsoft Tech Ed 2006 #1Microsoft Tech Ed 2006 #1
Microsoft Tech Ed 2006 #1
 
Diff sand box and farm
Diff sand box and farmDiff sand box and farm
Diff sand box and farm
 
Integrate Flex With Spring Framework
Integrate Flex With Spring FrameworkIntegrate Flex With Spring Framework
Integrate Flex With Spring Framework
 
Integrate facebook using mule esb
Integrate facebook using mule esbIntegrate facebook using mule esb
Integrate facebook using mule esb
 
Product update sso authentication method released for orangescrum
Product update  sso authentication method released for orangescrumProduct update  sso authentication method released for orangescrum
Product update sso authentication method released for orangescrum
 
VMukti Client Installation Guide For V1034 to V1038
VMukti Client Installation Guide For V1034 to V1038VMukti Client Installation Guide For V1034 to V1038
VMukti Client Installation Guide For V1034 to V1038
 

Viewers also liked

Android Abc2009 Fall Shima091130 1
Android Abc2009 Fall Shima091130 1Android Abc2009 Fall Shima091130 1
Android Abc2009 Fall Shima091130 1
shimay
 
Bozic sisljavic
Bozic sisljavicBozic sisljavic
Bozic sisljavic
Gavranica
 
Using CKAN as a data store
Using CKAN as a data storeUsing CKAN as a data store
Using CKAN as a data store
Joss Winn
 
周氏兄弟简介
周氏兄弟简介周氏兄弟简介
周氏兄弟简介
shuiyun.jie
 
LinkedUp kickoff meeting session 4
LinkedUp kickoff meeting session 4LinkedUp kickoff meeting session 4
LinkedUp kickoff meeting session 4
Hendrik Drachsler
 
Introduction Presentation for LinkedUp kickoff meeting
Introduction Presentation for LinkedUp kickoff meetingIntroduction Presentation for LinkedUp kickoff meeting
Introduction Presentation for LinkedUp kickoff meeting
Hendrik Drachsler
 

Viewers also liked (20)

Android Abc2009 Fall Shima091130 1
Android Abc2009 Fall Shima091130 1Android Abc2009 Fall Shima091130 1
Android Abc2009 Fall Shima091130 1
 
Eurocham PSI seminar Hong Kong
Eurocham PSI seminar Hong KongEurocham PSI seminar Hong Kong
Eurocham PSI seminar Hong Kong
 
Bozic sisljavic
Bozic sisljavicBozic sisljavic
Bozic sisljavic
 
Branding
BrandingBranding
Branding
 
Central Oh Prsa Socmed 10 3 09
Central Oh Prsa Socmed 10 3 09Central Oh Prsa Socmed 10 3 09
Central Oh Prsa Socmed 10 3 09
 
Graffiti Theatre
Graffiti TheatreGraffiti Theatre
Graffiti Theatre
 
Using CKAN as a data store
Using CKAN as a data storeUsing CKAN as a data store
Using CKAN as a data store
 
Integracija poslovnega sistema
Integracija poslovnega sistemaIntegracija poslovnega sistema
Integracija poslovnega sistema
 
周氏兄弟简介
周氏兄弟简介周氏兄弟简介
周氏兄弟简介
 
LinkedUp kickoff meeting session 4
LinkedUp kickoff meeting session 4LinkedUp kickoff meeting session 4
LinkedUp kickoff meeting session 4
 
Finding and sharing resources
Finding and sharing resourcesFinding and sharing resources
Finding and sharing resources
 
El abuso de las drogas
El abuso de las drogasEl abuso de las drogas
El abuso de las drogas
 
OPENVIS Conference Quick Report Part 2
OPENVIS Conference Quick Report Part 2OPENVIS Conference Quick Report Part 2
OPENVIS Conference Quick Report Part 2
 
Introduction Presentation for LinkedUp kickoff meeting
Introduction Presentation for LinkedUp kickoff meetingIntroduction Presentation for LinkedUp kickoff meeting
Introduction Presentation for LinkedUp kickoff meeting
 
Hoe bescherm ik mijn idee of merk?
Hoe bescherm ik mijn idee of merk?Hoe bescherm ik mijn idee of merk?
Hoe bescherm ik mijn idee of merk?
 
A Clever Way to Scale-out a Web Application
A Clever Way to Scale-out a Web ApplicationA Clever Way to Scale-out a Web Application
A Clever Way to Scale-out a Web Application
 
Chapter2
Chapter2Chapter2
Chapter2
 
Condones
CondonesCondones
Condones
 
FantáStic[1]
FantáStic[1]FantáStic[1]
FantáStic[1]
 
Color
ColorColor
Color
 

Similar to Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz

Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Build Database Applications for SharePoint!
Build Database Applications for SharePoint!
Iron Speed
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
Iron Speed
 
Continuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsContinuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with Jenkins
Michael Kröll
 
Trimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETTrimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NET
Mihir G.
 

Similar to Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz (20)

N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and Security
 
IIS Web Ecosystem
IIS Web EcosystemIIS Web Ecosystem
IIS Web Ecosystem
 
JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...
 
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
 
Introduce to PredictionIO
Introduce to PredictionIOIntroduce to PredictionIO
Introduce to PredictionIO
 
Build Database Applications for SharePoint!
Build Database Applications for SharePoint!Build Database Applications for SharePoint!
Build Database Applications for SharePoint!
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
Continuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsContinuous Deployment: The Dirty Details
Continuous Deployment: The Dirty Details
 
Continuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with JenkinsContinuous Web Performance Monitoring with Jenkins
Continuous Web Performance Monitoring with Jenkins
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 
Appium
AppiumAppium
Appium
 
Squirrel setup-ms teams
Squirrel setup-ms teamsSquirrel setup-ms teams
Squirrel setup-ms teams
 
SLBdiensten: Windows 10 deployment met Microsoft Deployment Toolkit en Setup ...
SLBdiensten: Windows 10 deployment met Microsoft Deployment Toolkit en Setup ...SLBdiensten: Windows 10 deployment met Microsoft Deployment Toolkit en Setup ...
SLBdiensten: Windows 10 deployment met Microsoft Deployment Toolkit en Setup ...
 
3 Web technologies benchmark - UPDATED
3 Web technologies benchmark - UPDATED3 Web technologies benchmark - UPDATED
3 Web technologies benchmark - UPDATED
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
What to consider before deploying a meteor app?
What to consider before deploying a meteor app?What to consider before deploying a meteor app?
What to consider before deploying a meteor app?
 
Qa process
Qa processQa process
Qa process
 
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptxHow to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
 
Trimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETTrimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NET
 

More from Suthep Sangvirotjanaphat

Mvc dev rocks 00 apr 26, 2014 - creating and using nu get in your own house...
Mvc dev rocks 00   apr 26, 2014 - creating and using nu get in your own house...Mvc dev rocks 00   apr 26, 2014 - creating and using nu get in your own house...
Mvc dev rocks 00 apr 26, 2014 - creating and using nu get in your own house...
Suthep Sangvirotjanaphat
 

More from Suthep Sangvirotjanaphat (6)

Mudularity and Unit Testing in TypeScript (for ng-bkk #3)
Mudularity and Unit Testing in TypeScript (for ng-bkk #3)Mudularity and Unit Testing in TypeScript (for ng-bkk #3)
Mudularity and Unit Testing in TypeScript (for ng-bkk #3)
 
TypeScript, Now.
TypeScript, Now.TypeScript, Now.
TypeScript, Now.
 
Mvc dev rocks 00 apr 26, 2014 - creating and using nu get in your own house...
Mvc dev rocks 00   apr 26, 2014 - creating and using nu get in your own house...Mvc dev rocks 00   apr 26, 2014 - creating and using nu get in your own house...
Mvc dev rocks 00 apr 26, 2014 - creating and using nu get in your own house...
 
Net 451 in action
Net 451 in actionNet 451 in action
Net 451 in action
 
Improve your Web Development using Visual Studio 2010
Improve your Web Development using Visual Studio 2010Improve your Web Development using Visual Studio 2010
Improve your Web Development using Visual Studio 2010
 
ASP.NET MVC 3 in area of Javascript and Ajax improvement
ASP.NET MVC 3 in area of Javascript and Ajax improvementASP.NET MVC 3 in area of Javascript and Ajax improvement
ASP.NET MVC 3 in area of Javascript and Ajax improvement
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz

  • 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.  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. 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. Good! I don’t worry about deployment any more. Good! It’s smart! http://GreatFriends.Biz (c) Suthep S. 5
  • 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.  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. Have a deep understanding about the update process, and take control to the AutoUpdate feature. http://GreatFriends.Biz (c) Suthep S. 8
  • 9.  Check before or after program starts  Scheduling check for update  Minimum required version. http://GreatFriends.Biz (c) Suthep S. 9
  • 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. 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.  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.  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.  The ApplicationDeployment events.  CheckForUpdateCompleted  CheckForUpdateProgressChanged  DownloadFileGroupCompleted  DownloadFileGroupProgressChanged  UpdateCompleted  UpdateProgressChanged http://GreatFriends.Biz (c) Suthep S. 14
  • 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.  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.  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.  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