473,473 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cannot load assemblies in sub-directories

3 New Member
Ok so I am making plugins for my application and I have the plugins located in a subdirectory:

/AppDir
/AppDir/Plugins

All my plugins reference a Plugins interface file, which is also located in the Plugins subdirectory. I used AppDomainSetup.PrivateBinPath property to have it probe the subdirectory, but when I try to load it into my AppDomain it throws an error:

Could not load file or assembly 'EmptyPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Which makes me think it can't find the file but when I comment out the PrivateBinPath property it throws me this error instead:

Could not load file or assembly 'EmptyPlugin' or one of its dependencies. The system cannot find the file specified.

So that tells me that it finds the file. When I view the detail of the first error it shows me this:

Source: mscorlib

So the only thing I can think is it can't load mscorlib. But mscorlib is in the GAC so I don't know how it couldn't load. Anyway, heres the code thats throwing the error:

Expand|Select|Wrap|Line Numbers
  1. public Plugin(IServer host, string domainName, string filePath)
  2.         {
  3.             AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
  4.             setup.PrivateBinPath = "Plugins";
  5.             pluginDomain = AppDomain.CreateDomain(domainName, null, setup);
  6.             Assembly plugin = pluginDomain.Load(domainName); //Throws the error
If someone could help me that would be greatly appreciated.
Apr 2 '08 #1
1 2131
pzero24
3 New Member
I forgot to say that it is coded in C#
Apr 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kenny Cheng | last post by:
Dear all Anyone knows that this problem has been patched? Is this a .NET 1.1 or 1.0 problem PRB: Cannot Unload Assemblies That You Create and Load by Using Script in XSL ...
1
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be...
5
by: Rudolf Ball | last post by:
Dear NG, i want to load a plugin (WinForm) in my Applikation. That works fine. Now I want to globalize that plugin. So I have to load the Satellite Assembly, as well. But how can I load this...
1
by: Greg Patrick | last post by:
My problem: I load an some assemblies (strong named) from a byte array using Assembly.Load(byte). They load fine. But one one of them is actually accessed, it's referenced assemblies can't be...
1
by: Chriss | last post by:
I receive "could not load type" error message when trying to load aspx page. The DLL is built and is located in the correct bin directory. The type name in the "inherits" attribute matches the...
1
by: Dominique Vandensteen | last post by:
I want to dynamicly load a type (typename is defined in the database). This type is located in the exe itself or one of the dll's in the directory with the exe file. When creating an instance...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
0
by: mschep | last post by:
Hi, I built an assembly with a set of user controls. This can be done with the Visual Studio 2005 Deployment Project: building and merging for example all your aspx and ascx in one dll (lets...
3
by: navyliu | last post by:
I have raised a discussion about assembly unloading.But we can't get a final solution. Since we cannot unlaod a assembly,Is there any reference about this indicate that this problem won't make...
0
by: sdanda | last post by:
Hai i am working on vb.net. In my application I created four forms.Those are first.vb,f1.vb,f2.vb and f3.vb In firstvb I added 3 checkboxes and a "display" button.The 3 checkboxes are used to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.