Assembly Version problems

G

Guest

Hi,

I have built a Windows Forms app (.NET Framework 1.1, VB.NET).

I thought that if I left the Assembly version in AssemblyInfo.vb as the
default (1.1.*) then the Build number would change every day (since Jan 1
2000), and the Revision number would change every second (since midnight)

But when I build my app several times a day, the Revision number doesnn't
change, and the Build number is not even changing from day to day.

I do this in my splash form to check:

Dim sMsgVersion As String = "Build: " + New Version("1.1." &
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build.ToString
& "." &
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString).ToString

Debug.WriteLine("Version: " & sMsgVersion)

but the result is always the same:
Version: Build: 1.1.2595.31500

amd the last two (Build and revision) are staying the same!

what am I doing wrong please?

Also, how can I get it so the Build number is always the number of days
since 20th Jan 2007 (when I made first build of the project) ?

thanks

Philip
 
M

Mattias Sjögren

what am I doing wrong please?

IIRC it's a "feature" of VB.NET. I think the revision number is only
updated when the dev environment is stared.

Also, how can I get it so the Build number is always the number of days
since 20th Jan 2007 (when I made first build of the project) ?

If you don't like the default bahavior you ahve to implement your own
versioning scheme and update the AssemblyVersionAttribute before
building.


Mattias
 
G

Guest

thanks, that's the answer... close and re-open VS.NET for a new revision and
build.

cheers

Philip
 

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