473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Referencing the Assembly GUID

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!
Mar 1 '06 #1
3 1998
>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.
Mar 1 '06 #2
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?
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:uJ*************@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.

Mar 1 '06 #3
>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(GuidAttri bute)) 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.
Mar 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James Thurley | last post by:
I'm trying to dynamically compile assemblies and cache them to disk, which seems to work fine. When the data I'm compiling from changes, I want to re-generate the assembly and use the new version....
5
by: Tamir Khason | last post by:
I have compiled libraries as dlls (managed) and I have to uniquely enumerate it (kind of Guid for each one). All of them implements the same interface (see code block) and generate ID each time it...
14
by: Nak | last post by:
Hi there, Does anyone know how I would get the value of the assembly GUID in code from within the same application? Thanks in advance. Nick. --...
1
by: Brian Henry | last post by:
I need to mark assemblies with a unique id (GUID in this case) and retrieve it when the assembly is loaded into my application (a plug-in loader)... the plug-in assembly all have a class in it...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
3
by: pranesh.nayak | last post by:
Hello group, I'm facing a problem in calling a signed .Net class library (c#) from VB6 exe. I have a VB6 exe calling .net assembly. The call to .Net dll works fine when i deploy the .Net...
2
by: Rob R. Ainscough | last post by:
I tried the following and it does provide a GUID, but not the GUID listed in the My Project ... Assembly Info button. Dim myAss As myAss = .GetEntryAssembly Dim myAssGUID As System.Guid =...
2
by: PJ6 | last post by:
In VS.Net 2K3, a GUID use to be automatically included in the project's assemblyinfo.vb file: 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly:...
5
by: Jim | last post by:
I am trying to compile a demo from the XNA site and I get this error Error 1 Assembly generation failed -- Error emitting 'System.Runtime.InteropServices.GuidAttribute' attribute --'Incorrect...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.