【问题标题】:Rhino Licensing犀牛授权
【发布时间】:2014-06-02 02:05:26
【问题描述】:

我正在尝试使用 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-Licensing 添加到项目中的正确方法吗?为什么会出现此异常?我认为这个log4net.dll 已添加到Rhino.Licensing.dll

对不起,我的英语不好。

【问题讨论】:

    标签: .net rhino-licensing


    【解决方案1】:

    Rhino Licensing 依赖于 log4net。将 log4net 的引用添加到您的项目中,以便与您的应用程序一起部署。您可能特别需要版本 1.2.10.0,因为“最新”是 1.2.13...

    更新:

    作为替代方案,您可以参考 Rhino Licensing nuget 包;它应该获得您需要的所有依赖项。 http://www.nuget.org/packages/Rhino.Licensing/

    【讨论】:

    • 感谢您的建议。问题是格式错误license.xmlRhino.Licensing.dll 有自己的 log4net 引用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-06
    • 2011-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多