我有自定义 Nuget 存储库 (\\build\NugetFeed),而且我正在使用 nuget.org 来恢复我的包。
为了恢复包,我使用这个命令
dotnet restore --source \\build\NugetFeed --source https://api.nuget.org/v3/index.json --verbosity n
但是在我的构建服务器上,我收到以下错误
C:\Program Files\dotnet\sdk\2.2.107\NuGet.targets(114,5): error : The local source 'D:\BuildAgent\_work\5\s\https:\api.nuget.org\v3\index.json' doesn't exist. [D:\BuildAgent\_work\5\s\MyCode.sln]
并且没有恢复来自官方 Nuget 的软件包。是否还有其他使用 dotnet restore 的配置选项?
jgo*_*day 11
似乎是 dotnet cli restore 命令错误。
如果您首先指定本地原点,它会失败,否则会起作用。
# Fails
dotnet restore --source /tmp/Nuget --source https://api.nuget.org/v3/index.json
#Works
dotnet restore --source https://api.nuget.org/v3/index.json --source /tmp/Nuget
无论如何,您始终可以使用自定义 Nuget.config
# Fails
dotnet restore --source /tmp/Nuget --source https://api.nuget.org/v3/index.json
甚至将其添加到项目本身
#Works
dotnet restore --source https://api.nuget.org/v3/index.json --source /tmp/Nuget
| 归档时间: | 
 | 
| 查看次数: | 4056 次 | 
| 最近记录: |