Making the Components Accessible

Snoops

   

 
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
By Dhananjay  Katre, Prashant  Halari, Narayana  Rao  Surapaneni, Manu  Gupta, Meghana  Deshpande

Table of Contents
Chapter 9.   Migrating to Visual C++ .NET


Making the Components Accessible

Until now, what we have dealt with is the compilation of the .NET classes in the assemblies and the registration of those classes as coclasses and interfaces. When the COM client application activates the .NET runtime to run its components, the CLR first needs to locate the assembly itself. For this it will first look in the path of the executable. So if the assembly is deployed in the path of the executable, the CLR will find it and there will be no further problems as far as the assembly is concerned . But if the assembly is deployed elsewhere, the CLR after searching in the executable path will search for the assembly in the global assembly cache to see if the assembly exists there.

To register an assembly in the global assembly cache, the global assembly cache utility ( gacutil.exe ) is used. It can be used to uninstall it, too. The following syntax is used:

 gacutil /i Test.dll 

The /i switch installs the assembly, and the /u switch uninstalls it in the cache. While uninstalling, one can mention the version number to be uninstalled. If no version number is mentioned, all the versions get uninstalled .


Snoops

   
Top


Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
Migrating to. NET. A Pragmatic Path to Visual Basic. NET, Visual C++. NET, and ASP. NET
ISBN: 131009621
EAN: N/A
Year: 2001
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net