2017-02-13 738 views
0

我已经从朋友克隆了一个回购,而当我正在执行还原NugetPackages时,很多程序包都无法获得。Nuget:NU1001依赖项*无法解析。 (错误:... 100000ms后超时。)

在输出我得到想了很多记录:

log : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/nunit/index.json'. log : The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/nunit/index.json' has timed out after 100000ms. log : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/libuv/index.json'. log : The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/libuv/index.json' has timed out after 100000ms. log : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/moq/index.json'. log : The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/moq/index.json' has timed out after 100000ms. log : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.design/index.json'. log : The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.design/index.json' has timed out after 100000ms.

/*...CODE REMOVED FOR READABILITY...*/

log : The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.configuration.fileextensions/1.1.0/microsoft.extensions.configuration.fileextensions.1.1.0.nupkg' has timed out after 100000ms. error: Failed to retrieve information from remote source 'https://api.nuget.org/v3-flatcontainer/nunit/index.json'. error: The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/nunit/index.json' has timed out after 100000ms. error: Failed to retrieve information from remote source 'https://api.nuget.org/v3-flatcontainer/nunit/index.json'. error: The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/nunit/index.json' has timed out after 100000ms.

工具:
的Visual Studio 2015年的社区,更新3

DOTNET --version 1.0.0-preview2-003131

的NuGet 3.5.0

我的解决方案管理器看起来像波纹管形象: enter image description here

一个包。 json file ` { “title”:“Ghp”, “version”:“1.0.0”, “说明”: “GHP”, “版权”: “”, “作家”: “”],

"packOptions": { 
    "tags": [ "ghp" ], 
    "projectUrl": "", 
    "licenseUrl": "", 
    "repository": { 
     "type": "git", 
     "url": "" 
    } 
}, 

"buildOptions": { 
    "emitEntryPoint": false 
}, 

"frameworks": { 
    "netstandard1.6": { 
     "imports": [ 
      "dnxcore50", 
      "portable-net451+win8" 
     ] 
    }, 
    "net46": { 
     "frameworkAssemblies": { 
      "System.ComponentModel.DataAnnotations": "4.0.0.0" 
     } 
    } 
}, 

"dependencies": { 
    "Microsoft.EntityFrameworkCore": "1.1.0", 
    "Newtonsoft.Json": "9.0.1", 
    "Microsoft.EntityFrameworkCore.InMemory": "1.1.0", 
    "Microsoft.EntityFrameworkCore.Relational": "1.1.0", 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", 
    "Microsoft.Extensions.Configuration": "1.1.0", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", 
    "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", 
    "Microsoft.Extensions.Configuration.Json": "1.1.0", 
    "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0", 
    "Microsoft.Extensions.Localization": "1.1.0", 
    "Microsoft.Extensions.Logging": "1.1.0", 
    "Microsoft.Extensions.Logging.Console": "1.1.0", 
    "Microsoft.Extensions.Logging.Debug": "1.1.0", 
    "System.Diagnostics.StackTrace": "4.3.0" 
} 

}`

如果有人知道,给我一个提示如何用Nuget恢复解决问题。

谢谢。

回答

1

问题是因为我安装了Microsoft .NET Core 1.x.x - SDK 1.x.x Preview-x的多个版本,并且相同的Microsoft .NET Core 1.x.x - VS 2015 Tooling Preview-x

解决的办法是卸载所有那些老SDKVS 2015年模具和下载和https://www.microsoft.com/net/download/core

之后安装可用的最新版本,包被正确恢复和解决方案已成功重建。


现在我有了这套工具:
- Microsoft .NET Core 1.0.1 - SDK 1.0.0 Preview 2-003131 (x64)
- Microsoft .NET Core 1.0.1 - VS 2015 Tooling Preview 2
- Microsoft .NET Core 1.0.3 - SDK 1.0.0 Preview 2-003156 (x64)
- Microsoft .NET Core 1.1.0 - Runtime (x64)
- Visual Studio Community 2015 Update 3

+0

很高兴知道你有找到解决这个问题的原因。请标记您的答案,这对其他有相同问题的社区是有好处的。谢谢。 –

+0

@ Leo-MSFT,谢谢您的关心。我必须等待预定的时间间隔,直到可以接受解决问题的答案;) – meorfi

+1

非常感谢。这也解决了我的问题。 –

0

您能访问您要恢复的浏览器中的源文件吗?例如https://api.nuget.org/v3-flatcontainer/nunit/index.json?如果是,则可以使用以下方法作为临时解决方案:

  1. 手动从NuGet.org下载这些软件包。
  2. 设置本地存储库并将这些下载包添加到。
  3. 从本地存储库还原软件包。在此之前,您需要将本地存储库添加到包源:工具 - >选项 - > NuGet包管理器 - >包源。

注意:包“FindPackagesByIdAsync”应该是一个顾客包,它不能被之前一直推到NuGet.org或服务器下载。需要获取此包并将其设置到本地存储库中。

如果无法访问该来源,则需要检查您的网络设置。

相关问题