Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to set the version of an assembly using csc.exe ?

274 views
Skip to first unread message

Lester

unread,
Apr 4, 2001, 11:10:04 AM4/4/01
to
I'm creating an executable using csc.exe , but when i check the version
(using Lutz Roeder's Reflector utility) it is : 0.0.0.0.

How can i set it to 1.0.0.0 ?

Thanks in advance.


Daniel Pratt

unread,
Apr 4, 2001, 11:31:14 AM4/4/01
to
Hi Lester,

Use the AssemblyVersionAttribute (in the System.Reflection namespace):

...
using System.Reflection;

[assembly: AssemblyVersion("1.0.0.0")] // not in a class or
namespace
...

Regards,
Dan

"Lester" <darwin...@yahoo.com> wrote in message
news:eSjMueRvAHA.1820@tkmsftngp04...

Lester

unread,
Apr 4, 2001, 12:14:27 PM4/4/01
to
Hi Dan,
thanks for your help, but i didn't find any AssembyVersion attribute in the
documentation, and when i tried to compile my assembly with it, i got an
error. Any other ideas would be appreciated.

Thanks again.

"Daniel Pratt" <dprREMOVE...@hotmail.com> wrote in message
news:O98#JxRvAHA.1396@tkmsftngp05...

Lester

unread,
Apr 4, 2001, 12:43:26 PM4/4/01
to
You were right, there is an AssemblyVersionAttribute but is in the
System.Runtime.CompilerServices namespace, i tried it and it worked.

Thanks a lot.

"Lester" <darwin...@yahoo.com> wrote in message

news:uvDttCSvAHA.1968@tkmsftngp03...

S.Suresh

unread,
Apr 5, 2001, 12:37:34 AM4/5/01
to
use the compiler switch /a

csc /a.version:1.0.0.0 /out:try.exe try.cs

Suresh

"Lester" <darwin...@yahoo.com> wrote in message
news:eSjMueRvAHA.1820@tkmsftngp04...

0 new messages