我们在 BitBucket 中有一个 ASP.NET Web 应用程序项目,它引用了使用 Telerik Reporting 的类库。Telerik Reporting 具有相关的许可证(licenses.licx 文件)。
Azure 部署失败并显示以下消息:
CSC : error CS1566: Error reading resource '[Project].dll.licenses' -- 'Could not find file 'D:\home\site\repository\src\[Project]\obj\Release\[Project].dll.licenses'.'
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\Home\[PathTo].csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d2bd89fc1c1e79";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="D:\home\[PathTo]\"
obj 目录中的这个现有问题*.dll.licenses 文件不是用 TeamCity 中的 msbuild和链接的 MSDN 论坛帖子创建的,似乎通过安装额外的工具来解决这个问题 - 但我不相信这将是 Azure 中的一个选项?
类库中的 licenses.licx 文件也被设置为嵌入式资源,如果设置不正确,它显然会出错。