Extracting Assembly Info

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use the Assembly information to display version/build information
and I have some questions.

I'm able to get the FileMajorPart, FileMinorPart, & FileBuildPart. I am not
able to get to the stuff like AssemblyProduct, AssemblyCompany, etc...

2nd, How does the FileBuildPart work. I don't see where it is tracked. I
would have assumed that everytime I rebuild the project or the solution it
would increment, but that doesn't appear to be the case. Even if I change
something. And how do you reset it (which you would want to do for a new
Major or Minor version).

Lastly, how is the FileRevisionPart used and how is it different from the
FileBuildPart.

Thanks in advance.

Ed
 
The information you enter in the assemblyinfo.* class is added to the
assembly using an attributye so therefore you are going to have to extract
it from the assembly using reflection. The following example shows exactly
what you require.

http://winfx.msdn.microsoft.com/lib..._Attribute_GetCustomAttributes_1_f30c17d8.asp

As for the version numbers, if you change it from the default ( 1.0.*) then
it will not autogenerated a version number for you - the default is based
upon the current date and time. It is up to you how you want the version
number to increment with each release.

HTH

Ollie Riches
 
Thanks Ollie, although it sucks! I hate it when MS takes steps backwards.
In VB6, the Revision property of a project would auto increment with each
build. That's what I was after.
 
Back
Top