Cannot get application publish version in 2008

I am trying to get this: System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion

But the application namespace is not there. I just see System.Deployment.Internal. The object browser, however, shows me all the properties and methods of that namespace, but my app can't see it.

What am I missing?
LVL 32
Who is Participating?
bhmahlerConnect With a Mentor Commented:
Make sure you have a reference to System.Deployment.  Just goto Add Reference and select System.Deployment as it is not there by default.
My.Application.Info.Version will give you your application version.
DrDamnitAuthor Commented:
Yes, but not the published version. does not automatically increment when I do the clickonce publish.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.