Versioning problem

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I am picking up app version using Application.ProductVersion.ToString. The
problem is it always comes up with 1.0.0.0. Is the version not supposed to
change with successive builds?

Thanks

Regards
 
It is the assembly version that will change for every build (assuming it has
been defined so). Product version will reflect what is mentioned for the
AssemblyFileVersion attribute (in AssemblyInfo.cs if you are using VS) or
from VS menu Project | <project> Properties | Application tab and Assemly
Information dialog box.
 
Forgot to add: to get the assembly version use
Assembly.GetEntryAssembly().GetName().Version.ToString().

Assuming [assembly: AssemblyVersion ("1.0.0.*")] has been added, the above
will get a different version for each build.
 
Replacing

<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

with

<Assembly: AssemblyVersion("1.0.*")>

bring the version using Application.ProductVersion.ToString

Thanks

Regards

Siva M said:
Forgot to add: to get the assembly version use
Assembly.GetEntryAssembly().GetName().Version.ToString().

Assuming [assembly: AssemblyVersion ("1.0.0.*")] has been added, the above
will get a different version for each build.


Siva M said:
It is the assembly version that will change for every build (assuming it
has
been defined so). Product version will reflect what is mentioned for the
AssemblyFileVersion attribute (in AssemblyInfo.cs if you are using VS) or
from VS menu Project | <project> Properties | Application tab and Assemly
Information dialog box.
 
Back
Top