Nuget获取最新包将在VST上失败

Nuget获取最新包将在VST上失败,nuget,azure-pipelines,Nuget,Azure Pipelines,我有多个微服务,当我的模糊字符串搜索库更新时,我必须打开所有项目并更新 所以我转到project.json并对版本字符串进行了更改。我将其从特定版本更改为“*” Visual studio已还原该包 值得一提的是,我在网络共享上还有一个nuget配置文件 <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="mycompany nu

我有多个微服务,当我的模糊字符串搜索库更新时,我必须打开所有项目并更新

所以我转到project.json并对版本字符串进行了更改。我将其从特定版本更改为“*”

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>
我理解404结果,因为并非所有nuget服务器都必须包含该文件,但我不同意这表示失败,因为另一台服务器包含该包


如何修复它?

如果将包源代码更改为
https://api.nuget.org/v3/index.json
?很有趣。我发誓它与api/v3/一起工作。现在它只适用于api/v2/如果使用dotnet restore命令,结果会是什么?或者你能在一首歌里分享它吗?
<?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>
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