Home All Groups Group Topic Archive Search About
Author
3 May 2007 10:30 AM
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

Author
3 May 2007 2:07 PM
Siva M
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.

Show quoteHide quote
"John" wrote:

> 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
>
>
>
Author
3 May 2007 2:25 PM
Siva M
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.


Show quoteHide quote
"Siva M" wrote:

> 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.
>
> "John" wrote:
>
> > 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
> >
> >
> >
Author
3 May 2007 8:54 PM
John
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

Show quoteHide quote
"Siva M" <shiva***@online.excite.com> wrote in message
news:0B47C9D1-E537-4EAF-95A0-FBB4EFC26A0E@microsoft.com...
> 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" wrote:
>
>> 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.
>>
>> "John" wrote:
>>
>> > 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
>> >
>> >
>> >