PC Review


Reply
Thread Tools Rate Thread

Assembley version from within another assembley

 
 
Nak
Guest
Posts: n/a
 
      28th Aug 2003
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.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      28th Aug 2003
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)


"Nak" <(E-Mail Removed)> wrote in message
news:O5%23%(E-Mail Removed)...
> 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.
>
> --
>

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> It seems you are not enabling Option Strict. Enable it in the project
> properties and the compiler might find the error for you. Jobs a good'n!
>

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
>
>



 
Reply With Quote
 
Nak
Guest
Posts: n/a
 
      28th Aug 2003
> 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.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
It seems you are not enabling Option Strict. Enable it in the project
properties and the compiler might find the error for you. Jobs a good'n!
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      28th Aug 2003
Hello,

"Nak" <(E-Mail Removed)> schrieb:
> I wish I understood the version numbering system too


Basic information on versioning

http://msdn.microsoft.com/library/en...managevers.asp
http://msdn.microsoft.com/library/en...l/tdlg_ch5.asp
http://msdn.microsoft.com/library/en...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
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
Felix Lima
Guest
Posts: n/a
 
      28th Aug 2003


>> 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.


Hey Nick,

Take a look at the following snip from:

http://msdn.microsoft.com/library/de...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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] Windows XP Help 6 12th Mar 2008 12:14 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] Microsoft ASP .NET 5 9th Feb 2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] Microsoft ASP .NET 0 5th Feb 2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green Microsoft ASP .NET 0 5th Feb 2008 02:45 AM
Register Primary Interop Assembley Jim Microsoft Dot NET Framework 2 18th Nov 2003 12:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 PM.