I am trying to develop a licensing system using Rhino-Licensing. I downloaded Rhino.Licensing.dll and added reference into my project. I'm trying to run this example.
I generated license.xml
but there's execption in the app that use this license:
...
using Rhino.Licensing;
...
static void Main()
{
var publicKey = File.ReadAllText(@"c:\publicKey.xml");
new LicenseValidator(publicKey, @"c:\license.xml").AssertValidLicense();
Console.WriteLine("Hello");
Console.ReadKey();
}
{"Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The system cannot find the file specified.":"log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821"}
My questions are: Is this correct way for adding Rhino-Licensing into project and why i get this exception? I think this log4net.dll
is in added Rhino.Licensing.dll
.
Sorry for my bad english.
Rhino Licensing has a dependency on log4net. Add a reference to log4net to your project so that it is deployed with your application. You'll likely need version 1.2.10.0 specifically as the "latest" is 1.2.13...
Update:
As an alternative, you could probably reference the Rhino Licensing nuget package; it should get all the dependencies you need. http://www.nuget.org/packages/Rhino.Licensing/