x的脱机Nuget程序包

x的脱机Nuget程序包

本文介绍了Visual Studio 2017仅具有适用于.NET Core 2.x的脱机Nuget程序包。如何获得在线套餐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Nuget在线获取NuGet软件包,但Visual Studio仅向我提供 Microsoft Visual Studio脱机软件包。





我尝试使用以下网址:





    1. 单击Nuget软件包选项卡右上角的设置齿轮。


    1. 在设置对话框中(如问题中的屏幕快照所示),单击 + 按钮。

    2. 提供新的来源名称和 https://api.nuget.org/v3/index.json 的来源。



    这似乎对我有用


    I want to get NuGet Packages from Nuget online, but Visual Studio is only giving me 'Microsoft Visual Studio Offline Packages' as an option.

    I have tried adding another package source using the following URLS:

    and a few others, but I keep getting the following error(s):

    [Package source] Unable to load the service index for source http://packagesource. An error occurred while sending the request. The remote name could not be resolved: 'packagesource'[Nuget Online] The V2 feed at 'https://www.nuget.org/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework=''&includePrerelease=true&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '404 Not Found'.

    How can I get online packages for .NET Core?

    解决方案

    I think the answer is:

    1. Right click on the project and choose Manage NuGet packages.
    1. Click on the settings cog in the top right corner of the Nuget packages tab.
    1. In the settings dialog (as shown in the screenshot in the question), click on the + button.
    2. Give the new source a name and a source of https://api.nuget.org/v3/index.json.

    This appears to work for me

    这篇关于Visual Studio 2017仅具有适用于.NET Core 2.x的脱机Nuget程序包。如何获得在线套餐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 02:15