Click-once deployment version number
I am using Click-Once deployment. How can I display the version number of my application on a label?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Roei BarRank #1,271 · 1.4K reputationPosted Sep 23, 2009, 11:52 PM EDT
You can access the ClickOnce version information programatically from the following namespace:
System.Deployment.Applicat
Of course you'd want to ensure that the application was actually deployed using ClickOnce before relying on that data by using something like:
System.Deployment.Applicat
I dont know of any way to automatically update the assembly version with the ClickOnce version (other than installing some sort of macro into Visual Studio). But that of course doesn't mean there isn't a way - perhaps someone else might be able to suggest one?
Hope this helps, let us know how you go,
Nir Bar107 reputationPosted Sep 23, 2009, 11:40 PM EDT
You should use System.Windows.Fforms.Application.ProductVersion
This is a static property returning a String with the version number of your application
Please check "Accepted Answer" if this post helps you
Nir
patrickRank #4,458 · 342 reputationPosted Sep 24, 2009, 6:34 AM EDT