[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

how to programatically(from a resource) add version info to an exe.

Nagaraju

11/12/2003 12:29:00 AM

Hi,

We are developing an exe and want to add version info
programatically ( from .resources ).

How to do that using framework classes.


Thanks
Nagaraju
5 Answers

Michael Giagnocavo

11/12/2003 4:08:00 AM

0

string ver = typeof(OneOfYourTypes).Assembly.GetName().Version.ToString();

-mike
MVP


"Nagaraju" <nagrajgv@hotmail.com> wrote in message
news:12ed01c3a8b3$fd9ad160$a001280a@phx.gbl...
> Hi,
>
> We are developing an exe and want to add version info
> programatically ( from .resources ).
>
> How to do that using framework classes.
>
>
> Thanks
> Nagaraju


Nagaraju

11/12/2003 10:33:00 PM

0

bit confused.
I want to add the version information to my exe(what I am
developing).
How can i do that?

Thanks
Nagaraju

>-----Original Message-----
>string ver = typeof(OneOfYourTypes).Assembly.GetName
().Version.ToString();
>
>-mike
>MVP
>
>
>"Nagaraju" <nagrajgv@hotmail.com> wrote in message
>news:12ed01c3a8b3$fd9ad160$a001280a@phx.gbl...
>> Hi,
>>
>> We are developing an exe and want to add version info
>> programatically ( from .resources ).
>>
>> How to do that using framework classes.
>>
>>
>> Thanks
>> Nagaraju
>
>
>.
>

Michael Giagnocavo

11/13/2003 2:49:00 PM

0

Oh, then you just need to add some attributes.

Here's a C# sample "AssemblyInfo" file (VS.NET will create these
automatically):

using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the
information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]

This last attribute allows you to set the version.

-mike
MVP


"Nagaraju" <nagrajgv@hotmail.com> wrote in message
news:059a01c3a96c$dd3a8d70$a301280a@phx.gbl...
> bit confused.
> I want to add the version information to my exe(what I am
> developing).
> How can i do that?
>
> Thanks
> Nagaraju
>
> >-----Original Message-----
> >string ver = typeof(OneOfYourTypes).Assembly.GetName
> ().Version.ToString();
> >
> >-mike
> >MVP
> >
> >
> >"Nagaraju" <nagrajgv@hotmail.com> wrote in message
> >news:12ed01c3a8b3$fd9ad160$a001280a@phx.gbl...
> >> Hi,
> >>
> >> We are developing an exe and want to add version info
> >> programatically ( from .resources ).
> >>
> >> How to do that using framework classes.
> >>
> >>
> >> Thanks
> >> Nagaraju
> >
> >
> >.
> >


Nagaraju

11/14/2003 2:36:00 AM

0

Thanks Mike,
This is what I was looking for. I understand that we need
to specify these in the AssemblyInfo.cs.
Is there any way to take these values from a resource
values or They must be hardcoded?

Thanks
Nagaraju
>-----Original Message-----
>Oh, then you just need to add some attributes.
>
>Here's a C# sample "AssemblyInfo" file (VS.NET will
create these
>automatically):
>
>using System.Reflection;
>using System.Runtime.CompilerServices;
>//
>// General Information about an assembly is controlled
through the following
>// set of attributes. Change these attribute values to
modify the
>information
>// associated with an assembly.
>//
>[assembly: AssemblyTitle("")]
>[assembly: AssemblyDescription("")]
>[assembly: AssemblyConfiguration("")]
>[assembly: AssemblyCompany("")]
>[assembly: AssemblyProduct("")]
>[assembly: AssemblyCopyright("")]
>[assembly: AssemblyTrademark("")]
>[assembly: AssemblyCulture("")]
>[assembly: AssemblyVersion("1.0.*")]
>
>This last attribute allows you to set the version.
>
>-mike
>MVP
>
>
>"Nagaraju" <nagrajgv@hotmail.com> wrote in message
>news:059a01c3a96c$dd3a8d70$a301280a@phx.gbl...
>> bit confused.
>> I want to add the version information to my exe(what I
am
>> developing).
>> How can i do that?
>>
>> Thanks
>> Nagaraju
>>
>> >-----Original Message-----
>> >string ver = typeof(OneOfYourTypes).Assembly.GetName
>> ().Version.ToString();
>> >
>> >-mike
>> >MVP
>> >
>> >
>> >"Nagaraju" <nagrajgv@hotmail.com> wrote in message
>> >news:12ed01c3a8b3$fd9ad160$a001280a@phx.gbl...
>> >> Hi,
>> >>
>> >> We are developing an exe and want to add version
info
>> >> programatically ( from .resources ).
>> >>
>> >> How to do that using framework classes.
>> >>
>> >>
>> >> Thanks
>> >> Nagaraju
>> >
>> >
>> >.
>> >
>
>
>.
>

Michael Giagnocavo

11/14/2003 2:45:00 AM

0

They are attributes, so their values must be embedded at compile time into
the assembly, so no runtime lookups.
-mike
MVP

"Nagaraju" <nagrajgv@hotmail.com> wrote in message
news:06e401c3aa58$09d788b0$a301280a@phx.gbl...
> Thanks Mike,
> This is what I was looking for. I understand that we need
> to specify these in the AssemblyInfo.cs.
> Is there any way to take these values from a resource
> values or They must be hardcoded?
>
> Thanks
> Nagaraju
> >-----Original Message-----
> >Oh, then you just need to add some attributes.
> >
> >Here's a C# sample "AssemblyInfo" file (VS.NET will
> create these
> >automatically):
> >
> >using System.Reflection;
> >using System.Runtime.CompilerServices;
> >//
> >// General Information about an assembly is controlled
> through the following
> >// set of attributes. Change these attribute values to
> modify the
> >information
> >// associated with an assembly.
> >//
> >[assembly: AssemblyTitle("")]
> >[assembly: AssemblyDescription("")]
> >[assembly: AssemblyConfiguration("")]
> >[assembly: AssemblyCompany("")]
> >[assembly: AssemblyProduct("")]
> >[assembly: AssemblyCopyright("")]
> >[assembly: AssemblyTrademark("")]
> >[assembly: AssemblyCulture("")]
> >[assembly: AssemblyVersion("1.0.*")]
> >
> >This last attribute allows you to set the version.
> >
> >-mike
> >MVP
> >
> >
> >"Nagaraju" <nagrajgv@hotmail.com> wrote in message
> >news:059a01c3a96c$dd3a8d70$a301280a@phx.gbl...
> >> bit confused.
> >> I want to add the version information to my exe(what I
> am
> >> developing).
> >> How can i do that?
> >>
> >> Thanks
> >> Nagaraju
> >>
> >> >-----Original Message-----
> >> >string ver = typeof(OneOfYourTypes).Assembly.GetName
> >> ().Version.ToString();
> >> >
> >> >-mike
> >> >MVP
> >> >
> >> >
> >> >"Nagaraju" <nagrajgv@hotmail.com> wrote in message
> >> >news:12ed01c3a8b3$fd9ad160$a001280a@phx.gbl...
> >> >> Hi,
> >> >>
> >> >> We are developing an exe and want to add version
> info
> >> >> programatically ( from .resources ).
> >> >>
> >> >> How to do that using framework classes.
> >> >>
> >> >>
> >> >> Thanks
> >> >> Nagaraju
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >