Click here to Skip to main content
15,176,561 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am deploying a project which contains so many DLLs.
Here an example to show what i am facing.

I am having a module named Master Register. The same module is used to create Customer master and Employee master. The Master Register, Customer master and Employee master are seperate DLLs.

From this Master Register, i call the DLLs according to the selection made.
Eg: If the user wants to create Customer Master, then i call Customer.dll create method or the user wants to create Employee Master, then i call Employee.dll create method from the MasterRegister.dll.

Now one of my client needs only Customer Master, so that i just want to deliver MasterRegister.dll and Customer.dll. But i forced to send the Employee.dll with the above said DLLs becuase, when i compile the project it is asking for the Employee.dll, which is referenced in the MasterRegister.dll.

My Question is : How to send the MasterRegister.dll and Customer.dll, without sending the Employee.dll.

Please anyone suggest a solution, so that i can deliver the exact features asked by my client, without giving the extra feature.

Thanks in Advance.
Richard MacCutchan 4-Feb-12 5:03am
If the customer wants a version that does not use that DLL then you need to modify your application to not call any of its methods.
Maybe you are right, only I'm not 100% sure.
So, in my answer I explained all the technical part of using assemblies as plug-ins loaded during run time and work with them. Please see -- you might find it interesting.
J.Karthick 4-Feb-12 5:14am
you can hot code you application by restrict your customer to not use that Employee.dll methods.
You can change and rebuild your application by removing Employee.dll methods inside your application.

It looks like you need something like a kind of plug-in architecture.

I recently described implementation of such thing in detail in my answer:
C# Reflection InvokeMember on existing instance[^].

Most of this post just explains how to make an assembly loaded during run-time by the other assembly (as you say, without referencing) the way the host assembly could recognize some code in it and invoke it.

Manoj K Bhoir 4-Feb-12 7:51am
My 5!
Thank you, Manoj.
i think 1 simple solution wud b to create another employee.dll with all methods present in original employee.dll with EMPTY METHOD BODY

then send this file to client.

i know this isn't the best solution but this wud save ur time and headache of again designing rest of dll files.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900