Visual Basic .net, Assembly Revision number not incrementing

What do I need to do to make the revision number change?

In my Assembly, I have <Assembly: AssemblyVersion("1.0.*")>  specified. When I right-click on the bin file, a dll, the Build number is correct (adds up to today's date) but the revision number adds up to a time around 3 am (21368). I rebuilt the dll. Same number. Deleted and recreated the dll. Same number...

How do I make the revision number increment?
MikeBroderickAsked:
Who is Participating?
 
Carlos VillegasFull Stack .NET DeveloperCommented:
OK, well... check this article:
Controlling Assembly Version

Note   For a Microsoft Visual Basic® .NET project with an AssemblyVersion set to "1.0.*", the assembly version is only updated the first time the project is rebuilt within the Visual Studio .NET integrated development environment (IDE). The version number remains constant for subsequent rebuilds within the same instance of Visual Studio .NET. This does not represent a problem because the assembly version is for information only in assemblies that do not have a strong name. For strong named assemblies, you should avoid the use of wild characters in the AssemblyVersion attribute, as explained in the following section.
For C# projects with an AssemblyVersion set to "1.0.*", the assembly version is updated every time the project is rebuilt.

This is a old article but appear still valid for your case...

Check this too:
Version numbers in a compiled assembly

I hope this can help you.
0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Hello, remove the attribute <Assembly: AssemblyFileVersion("1.0.0.0")>  from your AssemblyInfo.vb, then try again.
0
 
MikeBroderickAuthor Commented:
I'm sorry, it is already removed.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
MikeBroderickAuthor Commented:
Update: About an hour elapsed, and when I rebuild the project, I get a new revision number. This doesnt make any sense.
0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Well... I'm not sure if it is a VS IDE bug... but if you reopen your project, change some thing and do a build it is refreshed...
0
 
Mez4343Commented:
Does the Created/Modified/Accessed dates on General tab of DLL show correct compiled date? This will verify you are looking at the DLL that you recompiled.

Also, make sure assembly: AssemblyFileVersion line is commented out in assembly.vb file. using both AssemblyVersion and AssemblyFileVersion prevents autoincrement for some reason.

Is there any post build event in project properties setting assembly version number?
0
 
MikeBroderickAuthor Commented:
I closed out the IDS then reopened it, then rebuilt the solution. The revision number changed. Thanks.
0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Glad to help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.