0

I have a solution with 2 class library projects: CalcSalaryLib and EmployeeManager.

EmployeeManager uses CalcSalaryLib and therefore has a reference to it. Also, CalcSalaryLib uses the jint.dll.

I need to provide EmployeeManager.dll to someone else to use it but I don't want to attach CalcSalaryLib.dll to it and I don't want him to use or even see the code inside it.

I read a little about ILMerge but that's not exactly what I looking for. I want to simulate a situation as if the methods and classes of CalcSalaryLib were internal within EmployeeManager.

What is the best approach to dealing with such a situation?

Roy Raz
  • 33
  • 1
  • 8
  • 1
    You can obfuscate the code and share the dll in Visual Studio- https://www.codeproject.com/Articles/1040107/Configuring-Visual-Studio-for-Obfuscation – Souvik Ghosh Aug 14 '17 at 06:23
  • Or you add a contract only assembly, containing only the interfaces for the CalcSalaryLib. Then the EmployeeManager assembly only references that new contract assembly, but not CalcSalaryLib directly. Have a look at Dependency Injection (DI) and DI containers – KBO Aug 14 '17 at 07:38

0 Answers0