【发布时间】: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 检测到构建机器并忽略许可证检查。
【问题讨论】: