How do I retrieve the application version? 
Author Message
 How do I retrieve the application version?

Hey everyone,
I know this is probably a dumb question, but how do I get the version
(major, minor, etc) of my application in VB.NET?

I've tried creating a Version object, but everytime I try to get data from
it, I get a System.NullReferenceException error.

Thanks for the help,

mikey



Mon, 28 Jul 2003 08:58:34 GMT  
 How do I retrieve the application version?

Quote:
>I know this is probably a dumb question, but how do I get the version
>(major, minor, etc) of my application in VB.NET?

http://msdn.microsoft.com/library/dotnet/cpref/frlrfsystemwinformsapp...

Be aware that some of Application functions do not work correctly in
Beta 1 (from the top of my head, I don't know if this is one of them).



Mon, 28 Jul 2003 09:03:04 GMT  
 How do I retrieve the application version?
Application is a WinForms class. Does it works in Console applications?

regards
Marcus


Quote:
> >I know this is probably a dumb question, but how do I get the version
> >(major, minor, etc) of my application in VB.NET?

http://msdn.microsoft.com/library/dotnet/cpref/frlrfsystemwinformsapp...
nclassproductversiontopic.htm
Quote:

> Be aware that some of Application functions do not work correctly in
> Beta 1 (from the top of my head, I don't know if this is one of them).



Tue, 29 Jul 2003 01:55:38 GMT  
 How do I retrieve the application version?

Quote:
> Application is a WinForms class. Does it works in Console applications?

If you reference WinForms, it should. But obviously, you wouldn't want
to have to reference the entire WinForms blob just to be able to
display "1.0.0.0". Personally, I think its a bad design decision to
put it there.


Tue, 29 Jul 2003 02:08:33 GMT  
 How do I retrieve the application version?
I think it's bad design too.

This works without referencing WinForms:
Assembly.GetExecutingAssembly().GetName().Version.ToString()

regards
Marcus


Quote:
> > Application is a WinForms class. Does it works in Console applications?

> If you reference WinForms, it should. But obviously, you wouldn't want
> to have to reference the entire WinForms blob just to be able to
> display "1.0.0.0". Personally, I think its a bad design decision to
> put it there.



Tue, 29 Jul 2003 02:23:03 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Retrieving a DLL's version from code

2. API to retrieve O/S version

3. Retrieving file version

4. How would I retrieve IE Browser version?

5. Retrieving the version number from a file

6. Retrieving File Version information in VB

7. how to retrieve version from EXE [Q]

8. Retrieving Bios version from computers in a windows 2000 domain

9. retrieving file version

10. Retrieve version of ADO

11. Retrieve version of ADO

12. Retrieving the version of DLL's used

 

 
Powered by phpBB® Forum Software