我正在尝试开发一个使用Rhino-Licensing的许可系统。我下载了Rhino.Licensing.dll并将引用添加到我的项目中。我正在尝试运行this示例。我生成了license.xml,但在使用此许可证的应用程序中有可执行项:
...
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"}
我的问题是:这是将Rhino许可添加到项目中的正确方式吗?为什么我会得到这个异常?我想这个log4net.dll已经添加了Rhino.Licensing.dll。
对不起,我的英语不好。
发布于 2014-04-18 01:22:18
Rhino许可依赖于log4net。将对log4net的引用添加到项目中,以便将其与应用程序一起部署。你可能需要1.2.10.0版本,因为“最新”版本是1.2.13……
更新:
作为另一种选择,您可能会引用Rhino Licensing包;它应该可以获得您需要的所有依赖项。http://www.nuget.org/packages/Rhino.Licensing/
https://stackoverflow.com/questions/23139278
复制相似问题