473,326 Members | 2,010 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,326 software developers and data experts.

GAC Information

Hi,

Can anyone help me how to programatically get the information that is shown
as codebase when you use the Windows explorer to browse Windows\Assembly
folder -right click on any GACed assembly - properties - then you see the
codebase which is original location of the assembly.

How can I get that path in C# code? Thanks very much!

John
Nov 16 '05 #1
4 7601
A right-click on an assembly in the Windows Explorer view of
\Windows\assembly shows a box with two tabs, General and Version, and
neither on my XP box show a codebase. In any case, the Explorer shell
extension view of that folder shows the files that are actually in that
folder, they are not somewhere else. Browse it with a command prompt and
you'll see the structure that the shell extension decodes in Explorer. It's
not clear to me what you're trying to do.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"John Lee" <jo*********@pursca.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
Hi,

Can anyone help me how to programatically get the information that is
shown as codebase when you use the Windows explorer to browse
Windows\Assembly folder -right click on any GACed assembly - properties -
then you see the codebase which is original location of the assembly.

How can I get that path in C# code? Thanks very much!

John

Nov 16 '05 #2
Hi, Phil,

Try to right click "System.Messaging 1.0.5000.0" and the codebase should be
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/System.Messaging.dll
or try to use GACUTIL to gac one of your own strong named dll and then right
click that assembly there you should be able to see the codebase.

My question is how/where does the shfusion gets that information? It must be
stored somewhere because when you GAC an assembly using gacutil you passed
the assembly path and that path will be shown as codebase. How can I
programatically get it? - GAC viewer can get that info so it should be
available somewhere.

Or anyone know a better solution for my real problem: I have a dll that will
be invoked by BizTalk Server and so I do not control the entry point. This
dll have a configuration setting file located at the same folder as the
assembly, I GACed this assembly (this is required if it will be invoked by
BizTalk Server), inside this assembly, I was trying to use
System.Reflection.Assembly.GetExecutingAssembly(). Codebase to get the
original path of my assembly before it's GACed - BUT it returns the path
like "c:\windows\assembly\gac\xxxxx" which is the location of the GACed
assembly. Is there a way to find out where is the GACed assembly come
from? - Then I realized that the GAC viewer actually can get that
information - it means that it's stored somewhere just matter of how to get
it out by using what API.

I tried some wrapper of fusion.dll - but w/o any luck to get that piece of
information. There must be a master that know how to get it :) Please
help!!!

Thanks!
John

"Phil Wilson" <pd*******@nospam.cox.net> wrote in message
news:eR**************@TK2MSFTNGP12.phx.gbl...
A right-click on an assembly in the Windows Explorer view of
\Windows\assembly shows a box with two tabs, General and Version, and
neither on my XP box show a codebase. In any case, the Explorer shell
extension view of that folder shows the files that are actually in that
folder, they are not somewhere else. Browse it with a command prompt and
you'll see the structure that the shell extension decodes in Explorer. It's
not clear to me what you're trying to do.
--
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"John Lee" <jo*********@pursca.com> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
Hi,

Can anyone help me how to programatically get the information that is
shown as codebase when you use the Windows explorer to browse
Windows\Assembly folder -right click on any GACed assembly - properties -
then you see the codebase which is original location of the assembly.

How can I get that path in C# code? Thanks very much!

John


Nov 16 '05 #3
If you look in the same physical directory as the assembly (c:\windows\assembly\GAC\xxxx) there you will see a file called __assemblyinfo__.ini. If you take a look in this file (its in ini file format unsurprisingly) you will see a URL value which is the directory from which the assembly was GAC'd

(I'll have a think about the Biztalk side of things)

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<O$**************@TK2MSFTNGP15.phx.gbl>

Hi, Phil,

Try to right click "System.Messaging 1.0.5000.0" and the codebase should be
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/System.Messaging.dll
or try to use GACUTIL to gac one of your own strong named dll and then right
click that assembly there you should be able to see the codebase.

My question is how/where does the shfusion gets that information? It must be
stored somewhere because when you GAC an assembly using gacutil you passed
the assembly path and that path will be shown as codebase. How can I
programatically get it? - GAC viewer can get that info so it should be
available somewhere.
Nov 16 '05 #4
Thanks very much, Richard!

John
"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:eL*************@TK2MSFTNGP09.phx.gbl...
If you look in the same physical directory as the assembly
(c:\windows\assembly\GAC\xxxx) there you will see a file called
__assemblyinfo__.ini. If you take a look in this file (its in ini file
format unsurprisingly) you will see a URL value which is the directory
from which the assembly was GAC'd

(I'll have a think about the Biztalk side of things)

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<O$**************@TK2MSFTNGP15.phx.gbl>

Hi, Phil,

Try to right click "System.Messaging 1.0.5000.0" and the codebase should
be
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/System.Messaging.dll
or try to use GACUTIL to gac one of your own strong named dll and then
right
click that assembly there you should be able to see the codebase.

My question is how/where does the shfusion gets that information? It must
be
stored somewhere because when you GAC an assembly using gacutil you passed
the assembly path and that path will be shown as codebase. How can I
programatically get it? - GAC viewer can get that info so it should be
available somewhere.

Nov 16 '05 #5

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

Similar topics

0
by: Emine Ekin | last post by:
/*Apologize for multiple posts*/ FIRST CALL FOR PAPERS ADVIS 2006 Fourth Biennial International Conference on Advances in Information Systems 18-20 October, 2006 Izmir, Turkey
8
by: Raquel | last post by:
The "DB2 Information Center" (http://publib.boulder.ibm.com/infocenter/db2help/index.jsp) seems to be an amazing resource and as far as I could tell (after browsing through various sections of...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
6
by: Markus Wildgruber | last post by:
Hi! How can I get information about the system my application is running on? I found the System.Environment class that provides me with some of the desired information but some of them not in...
6
by: Ian Williamson | last post by:
Greetings, My company has an ASP.NET based enterprise product that is undergoing some changes and I need some community input to help solve a problem. In the current implementation, any given...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
1
by: keke3905 | last post by:
I really would appreciate some help on this assignment. I need to make GUI boxes to display the system info such as on Microsoft Office. I have some code but not sure where to go with the rest of...
0
by: Lester Knutsen | last post by:
A two-day IBM Informix and DB2 User Group Technical Conference - Friday and Saturday, December 8-9, 2006 Location - Fairview Park Marriott, Falls Church, VA (near Washington D.C.)...
10
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm trying to use the new VB 2008 right now and I want to know how to preset the company name and copyright informtion in Assembly Information. In my current VB 2005, company name...
1
by: sora | last post by:
Hi, I've developed a MFC program under VS 6.0. My debugger *was* working fine and I've used it often for my project. Then, one day, the errors below appear and they prevent me from using the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.