473,508 Members | 2,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reflection issue with a plug in project.

I've knocked up a quick plug in project (actually it's 6 projects, but
more on that in a moment).

This project is referenced by a shared add in (used for Excel).

The issue I have is that when I iterate through the DLL's in the plug
in's directory, when it finds my plug in dll it claims there are no
types in the assembly.

Assembly assembly = Assembly.LoadFile(pDllName);
foreach (Type type in assembly.GetTypes())
{

Here GetTypes() returns no types. However it does not throw an
exception so it does appear to have loaded the assembly.

The assembly contains one class PluginA which derives from a base
class in a seperate project called PluginBase. PluginBase implements
an interface IPlugin which is in a third assembly.

so we have:

public class PluginA : Plugin.PluginBase

public abstract class PluginBase : MarshalByRefObject, IPlugin

public interface IPlugin

This is running (or not as the case seems to be) under framework 1.1.

I'm slightly baffled, I've done similar things before and not
experienced this, I'm guessing it's related to the heirarchy, but I'm
just not sure. If there's any extra info I can provide please ask.

Thanks

Jul 13 '07 #1
1 1338
Ok, think I've cracked it, although I'm not sure why. Will investigate
that once I've got the rest of the bugs ironed out :)
I replaced the call to Assembly.LoadFile with Assembly.LoadFrom.

Jul 13 '07 #2

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

Similar topics

11
1744
by: Ian | last post by:
Hi, I am writing an application and am creating a plug-in interface for it. The application will need to 'find' the plug-in's and will then need to find all accessible methods. The...
4
14465
by: Jimi | last post by:
Given a C# project file path, can I use reflection to get all the assemblies referenced by the project? e.g., I know the path of a C# project, say, "c:\SomeProject.csproj", and I want to load...
4
1263
by: .NET VB NewBEE | last post by:
hi after going thru some articles i'm confused with "How to implement Reflection in my program" my requirement is to dynamically load dll(whih got a specific Interface) files from the same...
2
7752
by: Jeff | last post by:
I am trying to dynamically load an assembly via reflection and then invoke a method of that assembly that will populate a custom type collection passed into the method byref. I am able to...
5
1855
by: heddy | last post by:
I understand that reflection allows me to discover the metadata of a class at runtime (properties, methods etc). What I don't understand is where this is useful. For example: If I am the sole...
4
2182
by: Per Bolmstedt | last post by:
(This question has been asked previously in this group, but I don't think it was ever really properly answered.) I want to use reflection - preferably - to find all Web Forms in my web site that...
5
1847
by: | last post by:
I am having problems with casting or converting a class to to an interface from which it derives. I'm certain that it's due to how it's being loaded, but I'm not sure how to get past the problem....
11
189
by: Joe | last post by:
Hi all! I have an application which uses plug-ins. The plug-ins implement an interface. I have a case where 1 plug-in needs access to the an object of the calling application. I could create an...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
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
7505
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
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4729
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
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
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 ...
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.