Check out Jim Miller's PEWriter toolkit[1] - I think it will allow you
to grab the MVID - and from managed code too :)


[1]
http://www.gotdotnet.com/Community/User/Samples/download.aspx?FileGuid=1
4e16635-1752-432e-803e-f7013d51e2dd

> -----Original Message-----
> From: Moderated discussion of advanced .NET topics. [mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Luca Minudel
> Sent: Monday, September 15, 2003 2:28 PM
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] How to read MVID and assembly hash?
>
> I like to get a unique identifier of a compiled assembly, this
identity
> will
> be attached to results of tests logged in a file.
> The assembly source code is available thus it can be changed and/or
> recompiled by someone else.
> Because one of the assemblies does not have a strong name I cannot
rely
> only
> on it.
>
> How can I programmatically read the module version identifier (MVID)
of an
> assembly module (the unique identifier given to the module at every
> compilation)?
>
> How can I programmatically calculate the hash value of an Assembly
(the
> assembly hash that CLR uses to make sure the assembly hasn't been
> altered)?
>
> TIA (luKa)
>
> ===================================
> This list is hosted by DevelopMentorR  http://www.develop.com
> NEW! ASP.NET courses you may be interested in:
>
> 2 Days of ASP.NET, 29 Sept 2003, in Redmond
> http://www.develop.com/courses/2daspdotnet
>
> Guerrilla ASP.NET, 13 Oct 2003, in Boston
> http://www.develop.com/courses/gaspdotnet
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to