You can use licensing technology when creating an instance of the library. What I did in the past is to include the public key as a resource in the dll, and then look for the license xml document with a cryptographic signature signed with my private key. As I continue to keep track of my private key, itβs pretty hard to win.
Having said that .Net is highly decompiled, be sure and obfuscate it with a tool like Dotfuscator.
source share