Assembley version from within another assembley

  • Thread starter Thread starter Nak
  • Start date Start date
N

Nak

Hi there,

I have an application that uses plugins, what I would like to do is have
a property of the plugin called "Version" that will return the current
version of that assembly, the problem being that if I use
"Application.ProductVersion" it uses the application object of the assembley
that it is being used in. Is there a way to do this other than using

System.Diagnostics.FileVersionInfo.GetVersionInfo(assembleypath).ProductVers
ion

To do this? Thanks in advance.

Nick.
 
there is a really long attribute class in the System.Reflection namespace

like assemblyattributeinfomrationattributevars or something...

you'll find it.. you can't miss it. =)

but it gets assembly versions... because god forbid it would be as simple as

Application.Version.Major (.Minor, .Build, .Revision)
 
there is a really long attribute class in the System.Reflection namespace
like assemblyattributeinfomrationattributevars or something...
you'll find it.. you can't miss it. =)
but it gets assembly versions... because god forbid it would be as simple as
Application.Version.Major (.Minor, .Build, .Revision)

Cheers CJ,

I wish I understood the version numbering system too, I have an
application that is about 2 months old now and the application I started 2
days ago has a higher version number, even though It has only had less than
20 compiles, I dread to think how many my other app has. Oh well, cheers I
shall go and hunt in the object browser for it :-)

Nick.
 
Hello,

Nak said:
I wish I understood the version numbering system too

Basic information on versioning

http://msdn.microsoft.com/library/en-us/dndotnet/html/managevers.asp
http://msdn.microsoft.com/library/en-us/dnbda/html/tdlg_ch5.asp
http://msdn.microsoft.com/library/en-us/cptutorials/html/versioning_components.asp

Parts of the version number:

Main version
'Product' version
Sub version
Sub version, for example Service Pack
Build
During development, auto-increment
Revision
Hotfix or Quick Fix Engineering (QFE)

When using auto incrementation of numbers, the build number contains the
number of days since January, 2000; the revision contains the number of
seconds since midnight divided by 2.

HTH,
Herfried K. Wagner
 
Hey Nick,

Take a look at the following snip from:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/
tdlg_ch4.asp

<quote>
... For C# projects, the assembly version is incremented every time it is
rebuilt. For Visual Basic .NET projects, the assembly version is
incremented the first time the project is rebuilt after it is loaded into
Visual Studio .NET. Subsequent rebuilds within the same instance of Visual
Studio .NET do not result in the assembly version being incremented.
</quote>

I believe that's why you see the differences in version numbers between you
apps...

HTH

Félix Lima
Visual Basic and Visual Basic .NET


This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.
 
Back
Top