VB.NET VS 2005 Version Number in Application

Z

Zim Babwe

I have been making changes to my Windows Application and in the
Project/Properties the Publish Version shows the following:

Major: 1
Minor: 0
Build: 0
Revision: 45

I would like to show this information in the "About Screen" and I have:
My.Application.Info.Version
but this shows
Build: 0
Major: 1
MajorRevision: 0
Minor: 0
MinorRevision: 0
Revision: 0

(this was taken at a break point and displayed in the Immediate Window)

How can I display in my application the information regarding the correct
Major, Minor, Build, and Revision?

Thanks in advance
 
T

t

Same as VS2003...

Assembly * _assembly;
_assembly = Assembly::GetExecutingAssembly();
_assembly->ToString(); // contains the version
 
Z

Zim Babwe

This doesn't look like VB to me. Can you explain it a little better?

In my application I did a messagebox.show(My.Application.Info.Version)

and it gave me the 6 lines of output described below.

Thank you.
 
T

t

The code is C++. (I didn't see mention of a specific language in the
original post).
At runtime, you need to use reflection to pull the build information from
your
application's assembly manifest. I don't know the VB syntax for that, look
up
reflection in your help. The names should be the same in VB, try searching
help
for the GetExecutingAssembly function.

-- Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top