views:

134

answers:

3

For some reason, new projects set the version number of the assembly to 1.0.*, which then assigns what appears to be a random number once compiled.

Why is this not set to 1.0.0.0 like all other projects.

Thanks.

A: 

I have noticed that some templates have different behaviors in regards to this. My guess is they want to make sure it increments by default.

You can modify the template if you don't like the default setup.

Mitchel Sellers
A: 

You want the version number to be different for every build (with * it's based on TOD IIRC). It's at the core of side by side support in .net (that and strong naming).

For example, if you are doing a browser hosted assembly, IEHOST gets very confused if you update the assembly but don't update the version #. It will refuse to load the assembly since the http assembly doesn't match what's in the download cache, but it won't update the cache since the version #'s match.

Tony Lee
+2  A: 

The numbers aren't random, though they can appear that way if you don't know how they're generated. I came across it a while ago:

When a version is 1.0.d.s, "d" is the number of days since February 1, 2000 and "s" is the number of seconds since midnight/2.

rwmnau