In my program I want to create a assembly and save it, but when i set the
AssemblyVersion by call SetCustomAttribute, it donot change the assembly's
ver, but add a new .custom attribute with type
System.Reflection.AssemblyVersionAttribute. how can i change the .ver
attribute of my assembly.

thanks

xiaorun huang
huangxiaorun@runnysoft.com

Re: About Assembly Version by Jeff

Jeff
Wed Nov 05 20:56:55 CST 2003

Take a look at the AssemblyVersionAttribute class:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemreflectionassemblyversionattributeclasstopic.asp

-Jeff

"xiaorun huang" <hrun@sina.com> wrote in message
news:%23OOGdkApDHA.1928@TK2MSFTNGP12.phx.gbl...
> In my program I want to create a assembly and save it, but when i set the
> AssemblyVersion by call SetCustomAttribute, it donot change the assembly's
> ver, but add a new .custom attribute with type
> System.Reflection.AssemblyVersionAttribute. how can i change the .ver
> attribute of my assembly.
>
> thanks
>
> xiaorun huang
> huangxiaorun@runnysoft.com
>
>



Re: About Assembly Version by xiaorun

xiaorun
Thu Nov 06 15:46:40 CST 2003

It is no help to me, and i have read it more times!
Maybe i am not fullly express me. What my problem is:
I code a program it create a dynamic assembly by call DefineDynamicAssembly.
and Save it to a file.
I want to change this assembly'ver create by my program, not my program'ver.
So it should add some code to my program. And I use SetCutsomAttribute with
a CustomAttributeBuilder parameter. but by it, it will add a custom
attribute not modfiy the .ver of assembly that create by my program.

xiaorun huang

"Jeff Mastry" <reply@news.group> wrote in message
news:ug3hrGBpDHA.964@TK2MSFTNGP10.phx.gbl...
> Take a look at the AssemblyVersionAttribute class:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemreflectionassemblyversionattributeclasstopic.asp
>
> -Jeff
>
> "xiaorun huang" <hrun@sina.com> wrote in message
> news:%23OOGdkApDHA.1928@TK2MSFTNGP12.phx.gbl...
> > In my program I want to create a assembly and save it, but when i set
the
> > AssemblyVersion by call SetCustomAttribute, it donot change the
assembly's
> > ver, but add a new .custom attribute with type
> > System.Reflection.AssemblyVersionAttribute. how can i change the .ver
> > attribute of my assembly.
> >
> > thanks
> >
> > xiaorun huang
> > huangxiaorun@runnysoft.com
> >
> >
>
>



Re: About Assembly Version by Mattias

Mattias
Thu Nov 06 01:53:44 CST 2003


>how can i change the .ver attribute of my assembly.

You set it in the AssemblyName object you pass to
DefineDynamicAssembly



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Re: About Assembly Version by xiaorun

xiaorun
Thu Nov 06 21:05:04 CST 2003

Thanks!
It is what i want!

xiaorun huang

"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
news:eSTcMsDpDHA.2588@tk2msftngp13.phx.gbl...
>
> >how can i change the .ver attribute of my assembly.
>
> You set it in the AssemblyName object you pass to
> DefineDynamicAssembly
>
>
>
> Mattias
>
> --
> Mattias Sjögren [MVP] mattias @ mvps.org
> http://www.msjogren.net/dotnet/
> Please reply only to the newsgroup.



Re: About Assembly Version by Jeff

Jeff
Thu Nov 06 10:24:52 CST 2003

Sorry, I misunderstood your question. Glad you got the information you
needed.

-Jeff

"xiaorun huang" <hrun@sina.com> wrote in message
news:OSpGoiCpDHA.1284@TK2MSFTNGP09.phx.gbl...
> It is no help to me, and i have read it more times!
> Maybe i am not fullly express me. What my problem is:
> I code a program it create a dynamic assembly by call
DefineDynamicAssembly.
> and Save it to a file.
> I want to change this assembly'ver create by my program, not my
program'ver.
> So it should add some code to my program. And I use SetCutsomAttribute
with
> a CustomAttributeBuilder parameter. but by it, it will add a custom
> attribute not modfiy the .ver of assembly that create by my program.
>
> xiaorun huang
>
> "Jeff Mastry" <reply@news.group> wrote in message
> news:ug3hrGBpDHA.964@TK2MSFTNGP10.phx.gbl...
> > Take a look at the AssemblyVersionAttribute class:
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemreflectionassemblyversionattributeclasstopic.asp
> >
> > -Jeff
> >
> > "xiaorun huang" <hrun@sina.com> wrote in message
> > news:%23OOGdkApDHA.1928@TK2MSFTNGP12.phx.gbl...
> > > In my program I want to create a assembly and save it, but when i set
> the
> > > AssemblyVersion by call SetCustomAttribute, it donot change the
> assembly's
> > > ver, but add a new .custom attribute with type
> > > System.Reflection.AssemblyVersionAttribute. how can i change the .ver
> > > attribute of my assembly.
> > >
> > > thanks
> > >
> > > xiaorun huang
> > > huangxiaorun@runnysoft.com
> > >
> > >
> >
> >
>
>