Protect C# DLL from third party

Guillaume picture Guillaume · Jul 10, 2009 · Viewed 8.5k times · Source

Duplicate of: How to protect dlls?

I'd like to protect my C# DLL from being used by third party applications. I'd like only MY applycation to use this DLL. How can I achieved that ?

Thank you.

Answer

Jeff Moser picture Jeff Moser · Jul 10, 2009

Make everything internal in the DLL and then in the Properties\AssemblyInfo.cs, set the InternalsVisibleTo attribute to only point to the strong name of your application.