Get Build/Release Version of WPF Application?

angus_young_acdc
angus_young_acdc used Ask the Experts™
on
Hello Experts,

This is a silly question, but how exactly can I get the current build version (for Debug and/or Release) of a WPF application?  Basically when I start my WPF app, I want to display the current version to the user.

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dear your Debug or release version of WPF will be in Bin folder of you application. So just run you will get update version of your application.

use Assembly.GetExecutingAssembly().GetName().Version

Imports System.Reflection.Assembly
Dim version As System.Version =
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version
Hi waqarlaghari, sorry but you've misunderstood me.  I know where the exe file is, I am (or was) looking to display the actual version but couldn't remember how.

rajeshjamnadas thanks for that sorted now, albeit that's VB code, but seeing how it's identical to C# I can live with that haha.  Points awarded.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial