【问题标题】:PostSharp build error with AppveyorAppveyor 的 PostSharp 构建错误
【发布时间】:2017-12-10 12:07:52
【问题描述】:

我正在尝试将我的代码部署到 AppVeyor 上的构建机器,我发现我需要使用我的许可证详细信息创建一个 postsharp.config 文件来构建,但我有以下错误:

C:\projects\webapibase\packages\PostSharp.5.0.41\build\PostSharp.targets(314,5): 错误 PS0260:许可证错误。许可证 xxx 不允许从 C:\projects\webapibase\Service\postsharp.config。 [C:\projects\webapibase\Service\Service.csproj] C:\projects\webapibase\packages\PostSharp.5.0.41\build\PostSharp.targets(314,5): 错误 PS0242:许可证错误。没有安装有效的许可证密钥。 请访问https://www.postsharp.net/purchase 获取许可证 PostSharp 的。要注册许可证密钥,请使用 PostSharp Essentials 或 开始评估期,执行程序

我已经创建了 postsharp.config 文件:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.postsharp.org/1.0/configuration">
  <License Value="xxxx" />
</Project>

附言。 VSTS 中的同一个项目构建正常(没有文件),可能 PostSharp 检测到构建机器并忽略许可证检查。

【问题讨论】:

    标签: c# postsharp appveyor


    【解决方案1】:

    已修复,解决方法是在 Build 前添加 RegKey:

    REG ADD "HKEY_CURRENT_USER\Software\SharpCrafters\PostSharp 3" /v LicenseKey /t REG_SZ /d <your_license>
    

    【讨论】:

      【解决方案2】:

      【讨论】:

      • 很遗憾不起作用。这就是我所描述的关于创建 .config 文件的内容:/ 感谢 helo
      猜你喜欢
      • 1970-01-01
      • 2017-07-13
      • 2016-02-27
      • 2016-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-22
      相关资源
      最近更新 更多