Export (0) Print
Expand All

ApplicationDeployment.IsNetworkDeployed Property

Gets a value indicating whether the current application is a ClickOnce application.

Namespace:  System.Deployment.Application
Assembly:  System.Deployment (in System.Deployment.dll)

Public Shared ReadOnly Property IsNetworkDeployed As Boolean

Property Value

Type: System.Boolean
true if this is a ClickOnce application; otherwise, false.

If you want your application to run both inside and outside of a ClickOnce deployment (for example, if you need to debug your application on the local computer before deploying it), test IsNetworkDeployed before accessing the CurrentDeployment property.

IsNetworkDeployed will return true regardless of whether the application is installed or hosted online, and regardless of whether it was installed from a Web site, file share, or CD-ROM.

The following code example retrieves CurrentDeployment by using IsNetworkDeployed first to ensure that the reference is not Nothing.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

© 2015 Microsoft