Gets a value indicating whether the current application is a ClickOnce application.
Assembly: System.Deployment (in System.Deployment.dll)
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 before accessing the CurrentDeployment property.
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 first to ensure that the reference is not nullptr.