Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

Assembly Version problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Philip - 09 Feb 2007 17:36 GMT
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
Mattias Sjögren - 09 Feb 2007 18:20 GMT
>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

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Philip - 13 Feb 2007 10:22 GMT
thanks, that's the answer... close and re-open VS.NET for a new revision and
build.

cheers

Philip

> >what am I doing wrong please?
>
[quoted text clipped - 9 lines]
>
> Mattias

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.