[英]Nuget.org in visual studio 2015 update 2 wont get nuget packages
I have a strange error. 我有一个奇怪的错误。 I can't download nuget packages with visual studio 2015 update 2.
我无法使用Visual Studio 2015 Update 2下载nuget程序包。
I tried to ad nuget.org as package source but it returns 404 error 我尝试将nuget.org作为包源进行广告,但它返回404错误
[nuget.org] The V2 feed at ' https://nuget.org/Search() ?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='uap10.0'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.
[nuget.org]位于' https://nuget.org/Search()?$ filter = IsAbsoluteLatestVersion&searchTerm =''&targetFramework ='uap10.0'&includePrerelease = true&$ skip = 0&$ top = 26'的V2供稿返回了意外的状态代码“ 404未找到”。
[nuget.org] The V2 feed at ' https://nuget.org/odata/Search() ?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='uap10.0'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.
[nuget.org]位于' https://nuget.org/odata/Search()?$ filter = IsAbsoluteLatestVersion&searchTerm =''&targetFramework ='uap10.0'&includePrerelease = true&$ skip = 0&$ top = 26'的V2提要返回了意外的状态代码“ 404 Not Found”。
[nuget.org] The V2 feed at ' https://nuget.org/odata/Search() ?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='uap10.0'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.
[nuget.org]位于' https://nuget.org/odata/Search()?$ filter = IsAbsoluteLatestVersion&searchTerm =''&targetFramework ='uap10.0'&includePrerelease = true&$ skip = 0&$ top = 26'的V2提要返回了意外的状态代码“ 404 Not Found”。
I would like to install MVVM Light Toolkit, but I Can't cos it's available on nuget.org 我想安装MVVM Light Toolkit,但不能在nuget.org上使用它
Anyone know any solution? 有人知道解决方案吗?
For some reason, I had to edit my machine-wide config before this would start working in Visual Studio 2015 由于某些原因,我必须先编辑我的计算机范围内的配置,然后才能在Visual Studio 2015中正常工作
https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses https://docs.microsoft.com/zh-cn/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses
Open the file at this path: %ProgramData%\\NuGet\\Config[\\{IDE}[\\{Version}[\\{SKU}\\]]]NuGet.Config
在以下路径打开文件:
%ProgramData%\\NuGet\\Config[\\{IDE}[\\{Version}[\\{SKU}\\]]]NuGet.Config
And use the feed that SRO suggested: https://api.nuget.org/v3/index.json
并使用SRO建议的提要:
https://api.nuget.org/v3/index.json
: https://api.nuget.org/v3/index.json
Here is the full path to my specific machine-config: `C:\\ProgramData\\NuGet\\Config\\VisualStudio\\14.0\\Microsoft.VisualStudio.config 这是我特定机器配置的完整路径:`C:\\ ProgramData \\ NuGet \\ Config \\ VisualStudio \\ 14.0 \\ Microsoft.VisualStudio.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="Microsoft and .NET"
value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
基于Sylvian提到的内容,我可以通过将Visual Studio 2017社区版中所有项目(包括.NET Core等)的源代码添加为https://api.nuget.org/v3/index.json来使nuget包正常工作所有的nuget findbypackageid 404错误都消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.