asp.net-core - VSTS 构建中的 Nuget 包还原错误
问题描述
我为 csproj 之一创建了一个构建定义,如下所示。
我在使用此定义的构建过程中遇到了与 nuget restore 相关的错误,有人可以帮我解决这个问题吗?
[更新]
根据评论中提供的建议,我已更新为“**\*.sln”然后它已经工作但我收到如下错误
解决方案
对于新问题,在构建定义中添加一个 powershell 脚本任务来导入认证。
$pfxpath = 'pathtoees.pfx'
$password = 'password'
Add-Type -AssemblyName System.Security
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import($pfxpath, $password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"PersistKeySet")
$store = new-object system.security.cryptography.X509Certificates.X509Store -argumentlist "MY", CurrentUser
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"ReadWrite")
$store.Add($cert)
$store.Close()
有关详细信息,请参阅此问题:Visual Studio 团队服务部署/构建证书错误
推荐阅读
- sql - 获取 ORA-01775:在执行简单查询时循环同义词链
- asp.net-core-mvc - ASP.NET Core 运行状况检查 - UI 身份验证失败
- ios - Phonegap 外部链接仅在 testflight 中停止工作
- javascript - 我有一个要搜索 Cloud Firestore 的运动列表(数组)。但是,数组的大小会有所不同
- c# - 在 XML 记录中获取第一个免费 ID 的最简单方法
- vuex - 如何使用 Nuxt Auth 模块在 Vuex 中重新获取用户?
- python-3.x - 如何在 python GIL 中获取线程跟踪
- c# - 从另一个类访问时,Populated ObservableCollection 中没有项目
- c++ - 将图像转换为占用网格
- mysql - 如何在 SpringBoot-MyBatis-MySQL 中使用 SelectById(object_id) 获取特定对象?