jamie_pattison
Well-known member
- Joined
- Sep 9, 2008
- Messages
- 116
- Programming Experience
- Beginner
Im trying to deploy an application by using clickonce and having some difficulties with it. In a class i have this function
When i create my code on a form (to run the function above) i receive the error "Object not set to an instance" I try to add New to my declaration but then receive the error "Application Deployment has no constructors".
Im not sure what im doing wrong or how i should go about this. I know the code is not complete but since it does not go past the line AD = ApplicationDeployment.CurrentDeployment i decided to leave the remaining code
Could someone advise please?
Many Thanks
VB.NET:
Private AD As ApplicationDeployment
Private updateCheck As UpdateCheckInfo
Public Function SoftwareUpdate() As Boolean
Dim update As Boolean
AD = ApplicationDeployment.CurrentDeployment
If AD.CheckForUpdate Then
If updateCheck.AvailableVersion.Build > AD.CurrentVersion.Build Then
' Install updates
End If
End If
Return updateCheck
End Function
When i create my code on a form (to run the function above) i receive the error "Object not set to an instance" I try to add New to my declaration but then receive the error "Application Deployment has no constructors".
Im not sure what im doing wrong or how i should go about this. I know the code is not complete but since it does not go past the line AD = ApplicationDeployment.CurrentDeployment i decided to leave the remaining code
Could someone advise please?
Many Thanks
Last edited: