Home All Groups Group Topic Archive Search About

Referencing the Assembly GUID

Author
1 Mar 2006 5:39 AM
Jozef
Hello,

I apologize for such a newbie question, but I'd like to know if there's any
way to reference the assembly GUID?

Thanks!

Author
1 Mar 2006 6:18 AM
Mattias Sjögren
>I apologize for such a newbie question, but I'd like to know if there's any
>way to reference the assembly GUID?

What assembly GUID? In .NET v2.0 you can do
yourAssembly.ManifestModule.ModuleVersionId if that's what you're
looking for.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
1 Mar 2006 6:24 AM
Jozef
Hi Mattias,

When you create a new Windows Application project, the Assembly.vb has a
GUID, along with author, company name etc.  I'm just wondering how to
reference that elsewhere in the program.  DOes the
yourAssembly.ManifestModule.ModuleVersionID do the same thing?


Show quoteHide quote
"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
news:uJGn$gPPGHA.456@TK2MSFTNGP15.phx.gbl...
> >I apologize for such a newbie question, but I'd like to know if there's
> >any
>>way to reference the assembly GUID?
>
> What assembly GUID? In .NET v2.0 you can do
> yourAssembly.ManifestModule.ModuleVersionId if that's what you're
> looking for.
>
>
> Mattias
>
> --
> Mattias Sjögren [C# MVP]  mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
Author
1 Mar 2006 8:30 PM
Mattias Sjögren
>When you create a new Windows Application project, the Assembly.vb has a
>GUID, along with author, company name etc.  I'm just wondering how to
>reference that elsewhere in the program.

You can get it with
yourAssembly.GetCustomAttributes(GetType(GuidAttribute)) or
Marshal.GetTypeLibGuidForAssembly(yourAssembly).


Mattias

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