gpt4 book ai didi

.net - Nuget:NU1001 无法解析依赖项 *。 (错误:...在 100000 毫秒后超时。)

转载 作者:行者123 更新时间:2023-12-05 04:11:43 27 4
gpt4 key购买 nike

我从 friend 那里克隆了一个存储库,当我执行 Restore NugetPackages 时,很多包都无法获取。

在输出中我得到了很多记录,例如:


日志:为源“https://api.nuget.org/v3-flatcontainer/nunit/index.json”重试“FindPackagesByIdAsync”。
日志:对“GET https://api.nuget.org/v3-flatcontainer/nunit/index.json”的 HTTP 请求在 100000 毫秒后超时。
日志:为源“https://api.nuget.org/v3-flatcontainer/libuv/index.json”重试“FindPackagesByIdAsync”。
日志:对“GET https://api.nuget.org/v3-flatcontainer/libuv/index.json”的 HTTP 请求在 100000 毫秒后超时。
日志:为源“https://api.nuget.org/v3-flatcontainer/moq/index.json”重试“FindPackagesByIdAsync”。
日志:对“GET https://api.nuget.org/v3-flatcontainer/moq/index.json”的 HTTP 请求在 100000 毫秒后超时。
日志:为源“https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.design/index.json”重试“FindPackagesByIdAsync”。
日志:对“GET https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.design/index.json”的 HTTP 请求在 100000 毫秒后超时。

/*...为了可读性删除了代码...*/

log:对“GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.configuration.fileextensions/1.1.0/microsoft.extensions.configuration.fileextensions.1.1”的 HTTP 请求。 0.nupkg' 在 100000 毫秒后超时。
错误:无法从远程源“https://api.nuget.org/v3-flatcontainer/nunit/index.json”检索信息。
错误:对“GET https://api.nuget.org/v3-flatcontainer/nunit/index.json”的 HTTP 请求在 100000 毫秒后超时。
错误:无法从远程源“https://api.nuget.org/v3-flatcontainer/nunit/index.json”检索信息。
错误:对“GET https://api.nuget.org/v3-flatcontainer/nunit/index.json”的 HTTP 请求在 100000 毫秒后超时。

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

dotnet --version 1.0.0-preview2-003131

Nuget 3.5.0

我的解决方案资源管理器如下图所示: enter image description here

一个package.json文件`{ “标题”:“Ghp”, “版本”:“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 还原的问题。

谢谢。

最佳答案

问题是因为我安装了多个版本的 Microsoft .NET Core 1.x.x - SDK 1.x.x Preview-x 并且 Microsoft .NET Core 1.x.x - VS 2015 工具预览-x

解决方案是卸载所有那些旧的SDKVS 2015 工具,然后下载并安装https://www.microsoft.com/net/download/core 上可用的最新版本。

之后,包被正确恢复,解决方案被成功重建。


现在我有了这套工具:
- Microsoft .NET Core 1.0.1 - SDK 1.0.0 预览版 2-003131 (x64)
- Microsoft .NET Core 1.0.1 - VS 2015 工具预览版 2
- Microsoft .NET Core 1.0.3 - SDK 1.0.0 预览版 2-003156 (x64),
- Microsoft .NET Core 1.1.0 - 运行时 (x64),
- Visual Studio Community 2015 更新 3

关于.net - Nuget:NU1001 无法解析依赖项 *。 (错误:...在 100000 毫秒后超时。),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42207824/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com