Tip : c# extracting version number

Comes in handy if you want to implement an automatic application upgrade component.
By calling
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion
You'll get in return which current version is running and can alert the user that there is a new version available.
(The version can be set in a publish wizard or on a setup project in visual studio) 

While dubugging , the CurrentDeloyment object is not available so make sure you wrap the above call with
if (System.Diagnostics.Debugger.IsAttached == false)

Have fun.
Roiy

Published Sat, Sep 1 2007 3:47 PM by dotgrid

Filed under: , , , ,

Comments

# re: Tip : c# extracting version number@ Saturday, May 17, 2008 1:28 AM

Thanks for the info!

Michael

# re: Tip : c# extracting version number@ Thursday, February 04, 2010 3:36 PM

Got run time error "Could not read file from disk. Original Error: Application is not installed"

alan

# re: Tip : c# extracting version number@ Tuesday, August 24, 2010 1:14 AM

This is not easy to learn useful about this good post,but essay writers can propose to <a href="http://www.essayslab.com">buy essays</a> to get correct knowledge and it is doable to order written essays per really reduced costs!

MayTracy

# re: Tip : c# extracting version number@ Tuesday, August 24, 2010 12:46 PM

Mostly, students do not like the free term papers accomplishing, but they still need to present their creative writing ability! Thence, some comparison essay writing service would be a perfect assistant for custom essays writing.

essay online

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 6 and 6 and type the answer here: