I have a built program and I am trying to change out the default clickOnce update checker with a hard programmed one. I have added the using System.Deployment; but it does not contain the assembly information I need to call. What am I missing here? I have searched MSDN but it keeps saying this is the correct namespace to call.

The error shows as: The name ApplicationDeployment does not exist in the current context

Code from Program:

        private void UpdateApplication()
    {
        if (ApplicationDeployment.IsNetworkDeployed)
        {
            ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
            ad.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(ad_CheckForUpdateCompleted);
            ad.CheckForUpdateProgressChanged += new DeploymentProgressChangedEventHandler(ad_CheckForUpdateProgressChanged);

            ad.CheckForUpdateAsync();
        }
    }
Edit
Report