Programmatically Accessing ClickOnce
As pointed out at the beginning of this chapter, ClickOnce is handled by the .NET Framework, but more precisely it is part of the .NET Framework. This means it can be accessed via managed code. The .NET Framework exposes the
System.Deployment namespace that offers a managed way for interacting with ClickOnce. The subname-space
System.Deployment.Application and the
System.Deployment.Application.ApplicationDeployment class are the most useful items because they offer objects that enable developers to programmatically access ClickOnce information from an application. The
ApplicationDeployment class exposes a shared
CurrentDeployment property that enables access to interesting information on the current application ...