|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Accessing a dll in the GACHaving created my dll, I have installed it into the GAC. All fine, no problems.
The trouble starts when I try to access this dll. How do I tell my program to look in the GAC for the dll? Does it do this automatically? Do I have to specify it in the app.config file? Also, if I want to reference the dll in future, is there a way to get it to appear in the .NET tab of the Add Reference dialog in Visual Studio 2003? Sorry, but I'm new to this GAC stuff. Yes, .NET app will look GAC for the referenced dll first, if not, then look
into the same folder, then subfolder, or folder specified in app.config... Place dll into GAC, does not make it appear in VS's "References" dialog box, you need to modify a Windows Registry for this. Search the NET or MS KB would lead you to how to do this. Actually, it is recommended you keep a copy of the dll (exact version of the dll you placed into GAC) somewhere in your local drive and set reference to it in your developing project. As mentioned above, although your developing app has reference to the dll file somewhere in your drive, the app always try to load it from GAC first. Show quote "cashdeskmac" <cashdesk***@discussions.microsoft.com> wrote in message news:261210EF-1501-4FC3-9DEA-3DBC770AAC26@microsoft.com... > Having created my dll, I have installed it into the GAC. All fine, no > problems. > > The trouble starts when I try to access this dll. > > How do I tell my program to look in the GAC for the dll? Does it do this > automatically? Do I have to specify it in the app.config file? > > Also, if I want to reference the dll in future, is there a way to get it > to > appear in the .NET tab of the Add Reference dialog in Visual Studio 2003? > > Sorry, but I'm new to this GAC stuff. But what to do if I want to load .NET module from C/C++ code? I do now this
from SUN Java code. How do I find my DLL location in GAC? See my module Setup for MS Visual Studio 7.1 .NET with examples at http://www.simtel.net/product.php[id]95126[sekid]0[SiteID]simtel.net Vitaly Show quote "Norman Yuan" <NotR***@NotReal.not> wrote in message news:%23lRa7nopGHA.4996@TK2MSFTNGP05.phx.gbl... > Yes, .NET app will look GAC for the referenced dll first, if not, then > look into the same folder, then subfolder, or folder specified in > app.config... > > Place dll into GAC, does not make it appear in VS's "References" dialog > box, you need to modify a Windows Registry for this. Search the NET or MS > KB would lead you to how to do this. Actually, it is recommended you keep > a copy of the dll (exact version of the dll you placed into GAC) somewhere > in your local drive and set reference to it in your developing project. As > mentioned above, although your developing app has reference to the dll > file somewhere in your drive, the app always try to load it from GAC > first. > > "cashdeskmac" <cashdesk***@discussions.microsoft.com> wrote in message > news:261210EF-1501-4FC3-9DEA-3DBC770AAC26@microsoft.com... >> Having created my dll, I have installed it into the GAC. All fine, no >> problems. >> >> The trouble starts when I try to access this dll. >> >> How do I tell my program to look in the GAC for the dll? Does it do this >> automatically? Do I have to specify it in the app.config file? >> >> Also, if I want to reference the dll in future, is there a way to get it >> to >> appear in the .NET tab of the Add Reference dialog in Visual Studio 2003? >> >> Sorry, but I'm new to this GAC stuff. > > "load ..from C/C++" needs a bit more definition. In managed C++ you'd
probably have a reference to the .NET assembly at build time and at runtime it would be loaded from the GAC, as in the previous answer. If you mean you want to load it manually into a C++ app, you'd use the CLR hosting types of APIs or Assembly.Load from managed code. -- Show quotePhil Wilson [Microsoft MVP-Windows Installer] "Vitaly" <vital***@composiasoft.com> wrote in message news:eDeRngFqGHA.4188@TK2MSFTNGP04.phx.gbl... > But what to do if I want to load .NET module from C/C++ code? I do now > this from SUN Java code. How do I find my DLL location in GAC? See my > module Setup for MS Visual Studio 7.1 .NET with examples at > http://www.simtel.net/product.php[id]95126[sekid]0[SiteID]simtel.net > > Vitaly > > "Norman Yuan" <NotR***@NotReal.not> wrote in message > news:%23lRa7nopGHA.4996@TK2MSFTNGP05.phx.gbl... >> Yes, .NET app will look GAC for the referenced dll first, if not, then >> look into the same folder, then subfolder, or folder specified in >> app.config... >> >> Place dll into GAC, does not make it appear in VS's "References" dialog >> box, you need to modify a Windows Registry for this. Search the NET or MS >> KB would lead you to how to do this. Actually, it is recommended you keep >> a copy of the dll (exact version of the dll you placed into GAC) >> somewhere in your local drive and set reference to it in your developing >> project. As mentioned above, although your developing app has reference >> to the dll file somewhere in your drive, the app always try to load it >> from GAC first. >> >> "cashdeskmac" <cashdesk***@discussions.microsoft.com> wrote in message >> news:261210EF-1501-4FC3-9DEA-3DBC770AAC26@microsoft.com... >>> Having created my dll, I have installed it into the GAC. All fine, no >>> problems. >>> >>> The trouble starts when I try to access this dll. >>> >>> How do I tell my program to look in the GAC for the dll? Does it do >>> this >>> automatically? Do I have to specify it in the app.config file? >>> >>> Also, if I want to reference the dll in future, is there a way to get it >>> to >>> appear in the .NET tab of the Add Reference dialog in Visual Studio >>> 2003? >>> >>> Sorry, but I'm new to this GAC stuff. >> >> > > |
|||||||||||||||||||||||