473,244 Members | 1,360 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,244 software developers and data experts.

Assembly referencing problem with creating third party plug-in

I have a full-blown application that consists of several (fifteen or so)
assembly DLLs, each being a separate VS.NET project that outputs to the main
DLL's bin directory. They are all strongly named. I have registered the main
DLL, which references the other DLLs, to the GAC cache.

I have built a plug-in for a third party application with which I load the
GAC cached assembly. But it doesn't find the dependencies.

I just spent hours getting everything strong-named and getting the main DLL
into the cache, and it seems that I haven't gotten anywhere, as the
referenced DLLs still can't be found. Seems that the GAC cache really does
cache and doesn't just provide a reference point to the DLL and its runtime
directory.

How do I resolve this problem so that I can get the plug-in for the third
party app working?? I REALLY DON'T want to spawn a new process and use
Remoting!!!

Thanks for any help.

Jon
Nov 15 '05 #1
2 1540


"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:O0**************@TK2MSFTNGP10.phx.gbl...
I have a full-blown application that consists of several (fifteen or so)
assembly DLLs, each being a separate VS.NET project that outputs to the main DLL's bin directory. They are all strongly named. I have registered the main DLL, which references the other DLLs, to the GAC cache.

I have built a plug-in for a third party application with which I load the
GAC cached assembly. But it doesn't find the dependencies.

I just spent hours getting everything strong-named and getting the main DLL into the cache, and it seems that I haven't gotten anywhere, as the
referenced DLLs still can't be found. Seems that the GAC cache really does
cache and doesn't just provide a reference point to the DLL and its runtime directory.


Hi Jon,

The CLR looks for assemblies in the GAC first and then in the Application
Base directory and then in subdirectories named after the dll it is looking
for. It sounds like, the referenced DLLs are not in the Application Base
directory. You can use the following command to see what the CLR thinks
your base directory is:

MessageBox.Show(AppDomain.CurrentDomain.BaseDirect ory);

The Base Directory should also show up in your Fusion log. You can see this
if your exception bubbled up to the top and crashed your program. However,
if you had good exception handling in place, you may not see it. In this
case, launch fuslogvw.exe, check the Log Failures box, run your program and
let it generate the exception, and press the Refresh button on the Fusion
Log console window. When you press the View Log button, the fusion log will
pop up in IE. At the bottom of this log, you'll see four entries that say
"LOG: Attempting download of new URL file:///...". This is where the CLR is
looking, but can't find your DLLs.

If it is guaranteed that this will be the only place that those DLLs will
reside, even after deployment, then you can copy your DLLs into that
directory. Otherwise, add them all to the GAC.

Joe
--
http://www.csharp-station.com
Nov 15 '05 #2
I see. Well I can't add all the DLLs to the GAC because a lot of them are
COM wrappers and that would just be GAC [gack!] bloat.

What about ..

AppDomain.CurrentDomain.SetDynamicBase()

.. might this be of any use for me? (Looking into this further ..)

Thanks,
Jon
"Joe Mayo" <jm***@ddiieessppaammeerrssddiiee.com> wrote in message
news:Ow**************@TK2MSFTNGP10.phx.gbl...


"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:O0**************@TK2MSFTNGP10.phx.gbl...
I have a full-blown application that consists of several (fifteen or so)
assembly DLLs, each being a separate VS.NET project that outputs to the main
DLL's bin directory. They are all strongly named. I have registered the

main
DLL, which references the other DLLs, to the GAC cache.

I have built a plug-in for a third party application with which I load the GAC cached assembly. But it doesn't find the dependencies.

I just spent hours getting everything strong-named and getting the main

DLL
into the cache, and it seems that I haven't gotten anywhere, as the
referenced DLLs still can't be found. Seems that the GAC cache really does cache and doesn't just provide a reference point to the DLL and its

runtime
directory.


Hi Jon,

The CLR looks for assemblies in the GAC first and then in the Application
Base directory and then in subdirectories named after the dll it is

looking for. It sounds like, the referenced DLLs are not in the Application Base
directory. You can use the following command to see what the CLR thinks
your base directory is:

MessageBox.Show(AppDomain.CurrentDomain.BaseDirect ory);

The Base Directory should also show up in your Fusion log. You can see this if your exception bubbled up to the top and crashed your program. However, if you had good exception handling in place, you may not see it. In this
case, launch fuslogvw.exe, check the Log Failures box, run your program and let it generate the exception, and press the Refresh button on the Fusion
Log console window. When you press the View Log button, the fusion log will pop up in IE. At the bottom of this log, you'll see four entries that say
"LOG: Attempting download of new URL file:///...". This is where the CLR is looking, but can't find your DLLs.

If it is guaranteed that this will be the only place that those DLLs will
reside, even after deployment, then you can copy your DLLs into that
directory. Otherwise, add them all to the GAC.

Joe
--
http://www.csharp-station.com

Nov 15 '05 #3

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

Similar topics

3
by: Tony Jones | last post by:
I have a third party assembly that I need to strong name because the C# project I'm referencing it in will be strong named. Every time I compile my project I'm getting "Assembly generation failed...
6
by: Wolfgang Keller | last post by:
Hello, I'm looking for a spreadsheet application (MacOS X prefered, but Windows, Linux ar available as well) with support for Python scripting (third-party "plug-ins" are ok) and a database...
4
by: Bob | last post by:
I want to use a 3rd party assembly that links to a "4th party assembly." My problem is that I use a newer version of that 4th party assembly. When I add the assemblies as references to my...
2
by: EAI | last post by:
Is there a way to Install/UnInstall an assembly to GAC? Thanks!
0
by: Mikael Engdahl | last post by:
Hello I am using a third party assembly that worked perfectly for a couple of days and then suddenly doesn't work at all. I get this error message: "File or assembly name System, or one of...
11
by: Michael Maes | last post by:
Hello, I want to be able to load an assembly by selecting a dll from an OpenFileDialog. This seems to work, exept when that assembly references "3rd-Party dll's". Just this simple line: Dim...
0
by: Scott F K Hooper | last post by:
I'm going nuts! I'm using VS2005 with dotNet 2. I have had the following problem with three seperate third party dlls, any of which I would like to implement into my VB/asp.net project. At compile...
8
by: Dale | last post by:
I have created a class that implements IHttpModule and I want to use the module on several of the web sites that exist on my server. The module works great if I place the dll in a web applications...
2
by: Shilpa | last post by:
Hi, I am writing a C# plugin for a third party tool. Multiple versions of the same tool can be installed on the client machine at any given time. Version 6 of this tool is managed code while...
1
by: Curious | last post by:
Hi, I have a .NET program that uses a third party assembly. However, it doesn't seem to work because when I start my program, it gives me an error as below: Could not load file or assembly...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...

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.