我有多个微服务,当我的模糊字符串搜索的lib被更新时,我必须打开所有项目并更新。
所以我去了project.json并对版本字符串进行了更改。我将其从特定版本更改为“*”
"dependencies": {
/* was */
"FuzzyString": "1.6.6267.27548",
/* is now */
"FuzzyString": "*",
Visual Studio恢复了包。
值得一提的是,我在网络共享上也有一个nuget配置文件。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="mycompany nuget" value="http://serverxyz/nuget/" />
<add key="NuGet official package source" value="https://nuget.org/api/v3/" />
<!-- <add key="MS and .NET" value="https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet" /> -->
</packageSources>
<activePackageSource>
<add key="mycompany nuget" value="http://serverxyz/nuget/" />
<add key="NuGet official package source" value="https://nuget.org/api/v3/" />
<!-- <add key="MS and .NET" value="https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet" /> -->
</activePackageSource>
</configuration>
尽管如此,当恢复VSTS时,它失败了。
2017-03-01T09:12:59.1991601Z Restoring packages for C:\agent_work\10\s\abc\project.json...
2017-03-01T09:12:59.3141601Z GET http://serverxyz/nuget/FindPackagesById()?id='FuzzyString'
2017-03-01T09:12:59.3291601Z GET https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString'
2017-03-01T09:12:59.4511601Z OK http://serverxyz/nuget/FindPackagesById()?id='FuzzyString' 126ms
2017-03-01T09:12:59.4831601Z GET http://serverxyz/api/v2/package/fuzzystring/1.6.6267.27548
2017-03-01T09:12:59.5181601Z OK http://serverxyz/api/v2/package/fuzzystring/1.6.6267.27548 34ms
2017-03-01T09:13:00.5531601Z NotFound https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString' 1224ms
2017-03-01T09:13:00.5561601Z Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString''.
2017-03-01T09:13:00.5561601Z Response status code does not indicate success: 404 (Not Found).
2017-03-01T09:13:00.5591601Z GET https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString'
2017-03-01T09:13:01.1441601Z NotFound https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString' 262ms
2017-03-01T09:13:01.1441601Z Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString''.
2017-03-01T09:13:01.1451601Z Response status code does not indicate success: 404 (Not Found).
2017-03-01T09:13:01.1451601Z GET https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString'
2017-03-01T09:13:01.1461601Z NotFound https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString' 267ms
2017-03-01T09:13:01.1461601Z Failed to retrieve information from remote source 'https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString''.
2017-03-01T09:13:01.1461601Z Response status code does not indicate success: 404 (Not Found).
2017-03-01T09:13:01.1461601Z Failed to retrieve information from remote source 'https://nuget.org/api/v3/FindPackagesById()?id='FuzzyString''.
2017-03-01T09:13:01.1461601Z Response status code does not indicate success: 404 (Not Found).
2017-03-01T09:13:01.1561601Z ##[error]Error: C:\agent_work\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.5.0\NuGet.exe failed with return code: 1
2017-03-01T09:13:01.1561601Z ##[error]Packages failed to install
2017-03-01T09:13:01.1601601Z ##[section]Finishing: NuGet restore VerITStore.WebSite/VerITStore.WebSite.sln
我理解404结果,因为并非所有nuget服务器都必须包含该文件,但我不同意这应该表示失败,因为另一台服务器包含该软件包。
我该如何解决?