Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

gacutil /l does not show mscorlib

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin - 30 Dec 2004 11:46 GMT
I cannot get my application working, it cannot load a local dll. This local
dll has some dependencies, and I am trying to see if all the dependacies are
right.

Now the app/dll is dependant of mscorlib. I think all .NET apps are
dependant of this right? Then I check what was in the GAC with gacutil /l
and this dll does not show. Is it that standard that it is not listed, or is
there something wrong, or am I thinking something totally stupid?

Here my output, no mscorlib:

Microsoft_VsaVb, Version=7.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null
msatinterop, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null
mscorcfg, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null
mscorcfg, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null
MSDATASRC, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null
MSDDSLMP, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null
MSDDSP, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, Custom=null

One other newbee question in this. If your app refers to some dll in the
GAC, does that mean that all dll must be registered in the GAC or can I have
some local, some in the GAC??
Martin - 30 Dec 2004 13:10 GMT
I can see with the file explorer in C:\WINDOWS\assembly that the file
mscorlib is present, by the way. Why does not it shoe with gacutil /l ??
Anders Nor?s [MCAD] - 30 Dec 2004 13:35 GMT
> Now the app/dll is dependant of mscorlib. I think all .NET apps are
> dependant of this right? Then I check what was in the GAC with gacutil /l
> and this dll does not show. Is it that standard that it is not listed, or
> is there something wrong, or am I thinking something totally stupid?
Yes, all .NET apps depend on mscorlib. In versions 1.x of the .NET framework
this assembly is not in the GAC, but in the framework directory. In .NET 2.0
mscorlib is registered in the GAC.
You can use
System.Runtime.IneropServices.RuntimeEnvironment.GetRuntimeDirectory to
locate the framework directory.

> One other newbee question in this. If your app refers to some dll in the
> GAC, does that mean that all dll must be registered in the GAC or can I
> have some local, some in the GAC??
Yes, usually you'll use some global and some private assemblies. The runtime
uses the following steps to resolve an assembly reference:
1. Determine the correct assembly version by examining applicable
configuration files, including the application configuration file, publisher
policy file, and machine configuration file.
2. Check whether the assembly name has been bound to before. If so, the
previously loaded assembly is used.
3. Check the global assembly cache. If the assembly is found there, that
assembly is used.
4. Probes for the assembly using the following steps:
 a) If configuration and publisher policy do not affect the original
reference and if the bind request was created using the Assembly.LoadFrom
method, the runtime checks for location hints.
 b) If a codebase is found in the configuration files, the runtime checks
only this location. If this probe fails, the runtime determines that the
binding request failed and no other probing occurs.
 c) Probes for the assembly using the heuristics described in the probing
section. If the assembly is not found after probing, the runtime requests
the Windows Installer to provide the assembly. This acts as an
install-on-demand feature.

For more information read "How the Runtime Locates Assemblies":
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conhowruntimelocatesassemblies.asp


Anders Nor?s
http://dotnetjunkies.com/weblog/anoras/

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.