我正在尝试在.net核心项目中安装NuGet软件包,但请求的地址错误:
GET http://nuget.aerdata.loc/nuget/AerData/FindPackagesById()?id='RabbitMQ.Client%5C'&semVerLevel=2.0.0
错误日志:
info : GET http://nuget.aerdata.loc/nuget/AerData/FindPackagesById()?id='RabbitMQ.Client%5C'&semVerLevel=2.0.0
error: Failed to retrieve information about 'RabbitMQ.Client\' from remote source 'http://nuget.aerdata.loc/nuget/AerData/FindPackagesById()?id='RabbitMQ.Client%5C'&semVerLevel=2.0.0'.
error: No such host is known
我认为project.assets.json文件中的问题:
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"http://nuget.aerdata.loc/nuget/AerData/": {},
"https://aerdata.pkgs.visualstudio.com/_packaging/Shared/nuget/v3/index.json": {},
"https://api.nuget.org/v3/index.json": {}
},
它应该请求"https://api.nuget.org/v3/index.json"
,但我无法删除其他错误的网址:
"http://nuget.aerdata.loc/nuget/AerData/": {},
"https://aerdata.pkgs.visualstudio.com/_packaging/Shared/nuget/v3/index.json": {},
我该如何解决问题?
答案 0 :(得分:0)
您只需在Visual Studio工具->选项-> Nuget程序包管理器->程序包源中保持选中的nuget.org源代码即可。
然后重试。