Gets a Boolean that represents whether the application was deployed from a network using ClickOnce.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
The My.Application.IsNetworkDeployed property indicates whether the application was deployed from a network using ClickOnce. For more information on ClickOnce applications, see ClickOnce Security and Deployment.
You should confirm that this property is True before you access the Deployment property. Otherwise, if the application is not deployed from a network using ClickOnce, reading the My.Application.Deployment property results in an InvalidDeploymentException exception.
For more information on configuring ClickOnce, see Publishing ClickOnce Applications. For more information on deploying a ClickOnce application, see How to: Publish a ClickOnce Application using the Publish Wizard.
For more information on using the My.Application.IsNetworkDeployed property, see Overview of the Visual Basic Application Model.
Availability by Project Type
Windows Forms Application
Windows Forms Control Library
Web Control Library
This example downloads and installs the update after checking that the application is deployed from a network. The Update method does not update the application unless it is out of date. The application has to restart to use the update.
Only applications that are ClickOnce-deployed can be updated using the My.Application.Deployment object. For more information on deploying a ClickOnce application, see How to: Publish a ClickOnce Application using the Publish Wizard.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)