.net 从 VS2010 访问 NuGet Gallery (nuget.org) 的 URL 是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5693139/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the URL for NuGet Gallery to access (nuget.org) from VS2010?
提问by Wahid Shalaly
What is the URL for NuGet Gallery to access (nuget.org) from VS2010 via Package Manager Console? I tried to use the Web site URL (http://nuget.org/List/Packages) but it didn't work.
NuGet Gallery 通过包管理器控制台从 VS2010 访问 (nuget.org) 的 URL 是什么?我尝试使用网站 URL (http://nuget.org/List/Packages),但没有奏效。
采纳答案by Talljoe
http://go.microsoft.com/fwlink/?LinkID=206669
http://go.microsoft.com/fwlink/?LinkID=206669
That maps to: http://packages.nuget.org/v1/FeedService.svc/but you should use the Go link to future-proof yourself.
这映射到:http: //packages.nuget.org/v1/FeedService.svc/但你应该使用 Go 链接来证明自己的未来。
回答by skolima
With NuGet 3, the url has changed again, it's now https://api.nuget.org/v3/index.json.
使用 NuGet 3,url 再次更改,现在是https://api.nuget.org/v3/index.json.
Microsoft Docs should always list the latest feed address: Use packages from nuget.org > Enable the upstream on an existing feed.
Microsoft Docs 应始终列出最新的提要地址: 使用来自 nuget.org 的包 > 在现有提要上启用上游。
回答by rikoe
The Microsoft Go link in the accepted answer above is an old one, the correct URL is: http://go.microsoft.com/fwlink/?LinkID=230477
上面接受的答案中的 Microsoft Go 链接是旧的,正确的 URL 是:http: //go.microsoft.com/fwlink/?LinkID=230477
This points to https://www.nuget.org/api/v2/, which is the NuGet version 2 package source feed.
这指向https://www.nuget.org/api/v2/,它是 NuGet 版本 2 包源源。
I tend to use the actual URL, not the Go link anyway. As proven by the two different Go links, there is no guarantee it won't change as well, so I find it more explicit to point to the actual URL.
我倾向于使用实际的 URL,而不是 Go 链接。正如两个不同的 Go 链接所证明的那样,不能保证它也不会改变,所以我发现指向实际 URL 更明确。
The Microsoft Go links are, in my opinion, a bad idea. They completely obscure the actual web URL, which defeats the purpose of HTTP addresses in the first place.
在我看来,Microsoft Go 链接是个坏主意。它们完全掩盖了实际的 Web URL,这首先违背了 HTTP 地址的目的。
回答by Wahid Shalaly
I found that http://go.microsoft.com/fwlink/?LinkID=206669points to the full NuGet Gallery while the default registered url https://go.microsoft.com/fwlink/?LinkID=206669(watch the protocol: Https) points only to the Official NuGet package source.
我发现http://go.microsoft.com/fwlink/?LinkID=206669指向完整的 NuGet 库,而默认注册的 URL https://go.microsoft.com/fwlink/?LinkID=206669(观看协议: Https) 仅指向官方 NuGet 包源。
回答by Jeremy
For reference, you can check what the supported URLs are by going directly to the NuGet site here: https://www.nuget.organd looking under the heading 'NuGet Feed Locations'
作为参考,您可以通过直接访问此处的 NuGet 站点来检查支持的 URL:https: //www.nuget.org并在“NuGet 源位置”标题下查看

