Azure DevOps -System.Security.Cryptography与管道中运行构建任务时相关的错误
在DevOps Server 2020中,我有一个管道,该管道具有MSBuild步骤,该步骤对我的UWP应用程序失败。尝试构建时,我会收到以下错误:
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : Type 'System.Security.Cryptography.Pkcs.SignedCms' from assembly 'System.Security.Cryptography.Pkcs' was not included in compilation, but was referenced in method 'Signature.GetContentPackage(SignedCms, X509IncludeOption)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : Type 'System.Security.Cryptography.Pkcs.SignerInfo' from assembly 'System.Security.Cryptography.Pkcs' was not included in compilation, but was referenced in method 'Pkcs7.ValidateOverride(SignatureDataProperties, SignatureValidationProperties)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\x64\ilc\Tools\nutc_driver.exe @"O:\Agent1\_work\211\s\MyApp\MyApp.UWP\obj\x64\Release\ilc\intermediate\MDIL\MyApp.UWP.rsp"' returned exit code 1
如果我通过命令行中的MSBUILD手动执行构建(使用与DevOps相同的参数),但是当DevOps尝试这样做时,它会得到。那些错误。我尝试搜索这些错误,但没有太多运气找到以前遇到过的任何人。希望这里有人可以提供一些有关这可能是什么的提示,以及我们如何在整个生产线上得到它。谢谢!
In DevOps Server 2020 I've got a pipeline that has a MSBuild step that is failing for my UWP app. When attempting to build, I receive errors such as the following:
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : Type 'System.Security.Cryptography.Pkcs.SignedCms' from assembly 'System.Security.Cryptography.Pkcs' was not included in compilation, but was referenced in method 'Signature.GetContentPackage(SignedCms, X509IncludeOption)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : Type 'System.Security.Cryptography.Pkcs.SignerInfo' from assembly 'System.Security.Cryptography.Pkcs' was not included in compilation, but was referenced in method 'Pkcs7.ValidateOverride(SignatureDataProperties, SignatureValidationProperties)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
##[error]C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): Error : ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\x64\ilc\Tools\nutc_driver.exe @"O:\Agent1\_work\211\s\MyApp\MyApp.UWP\obj\x64\Release\ilc\intermediate\MDIL\MyApp.UWP.rsp"' returned exit code 1
I can successfully build the app if I execute the build manually via MSBuild in the command-line (using the same arguments as DevOps) but when DevOps attempts to do so, it gets those errors. I've tried searching for these errors but haven't had much luck finding anyone that has encountered this before. Hoping that someone here can offer some tips on what this might be, and how we can get this across the line. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论