简体   繁体   English

Artifactory 中的 Nuget 包未显示在 Visual Studio 中的可用包中

[英]Nuget package in Artifactory does not show up in available packages in Visual Studio

I am trying to use an Artifactory repository as a nuget package source in Visual Studio 2017, and my nuget package does not show up in the Nuget Package Manager.我正在尝试使用 Artifactory 存储库作为 Visual Studio 2017 中的 nuget 包源,但我的 nuget 包没有显示在 Nuget 包管理器中。 The manager says "No packages found" (or only shows existing installed packages).经理说“找不到包”(或只显示现有的已安装包)。 In PackageManager Settings / Package Sources, I set up a package source with a url like the one below在 PackageManager Settings / Package Sources 中,我设置了一个包源,其 URL 如下所示

http://server_name/artifactory/api/nuget/repository_name http://server_name/artifactory/api/nuget/repository_name

In Manage Packages for Solution, I only selected this one source and clicked "Include prerelease", but no sign of my package in the package manager.在 Manage Packages for Solution 中,我只选择了这一个源并单击了“Include prerelease”,但在包管理器中没有我的包的迹象。 I can successfully upload and download nuget packages to/from the repository using jfrog.exe without a problem.我可以使用 jfrog.exe 成功地将 nuget 包上传到/从存储库下载,没有问题。 If I enter my repository url in a web browser, it shows the repository service as an xml page.如果我在 Web 浏览器中输入我的存储库 URL,它会将存储库服务显示为一个 xml 页面。

Any idea what could be preventing the available nuget packages from being shown in the package manager?知道什么会阻止可用的 nuget 包显示在包管理器中吗?

Any idea what could be preventing the available nuget packages from being shown in the package manager?知道什么会阻止可用的 nuget 包显示在包管理器中吗?

Artifactory repository is an authenticated server, you should set your security credentials by using following commands before use it in the package manager: Artifactory 存储库是一个经过身份验证的服务器,在包管理器中使用它之前,您应该使用以下命令设置您的安全凭据:

nuget setapikey [apikey] -source [feedUrl]
nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]

Make sure you can use nuget.exe to push the nuget package to the server successfully.确保您可以使用 nuget.exe 成功将 nuget 包推送到服务器。

Here is a video about how to set up Artifactory as a NuGet repository , you can refer it for some more details.这是一个关于如何将 Artifactory 设置为 NuGet 存储库的视频,您可以参考它了解更多详细信息。

I found that what finally fixed the problem for me was to login as admin, select my repository under local repositories, and check the Force Authentication checkbox.我发现最终为我解决问题的是以管理员身份登录,在本地存储库下选择我的存储库,然后选中强制身份验证复选框。 That makes Nuget pop up a username/password dialog, and after I fill it in, I can see my nugget package and install it ok.这让Nuget弹出一个用户名/密码对话框,填完之后就可以看到我的nugget包并安装好了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio Nuget 管理器不显示 OpenTK package - Visual Studio Nuget manager does not show OpenTK package Artifactory-从Visual Studio Feed中隐藏NuGet软件包版本 - Artifactory - Hide NuGet Package Version From Visual Studio Feed 无法使用 Visual Studio NuGet 包管理器控制台安装包 - Cannot install packages using Visual Studio NuGet Package Manager Console 没有Visual Studio的软件包管理器,如何更新nuget软件包? - How to update nuget packages without package manager of visual studio? Visual Studio 2013 - 为每个项目设置Nuget包 - Visual Studio 2013 - Setting up Nuget packages for every project Visual Studio中是否有可用于c#命名约定的Nuget包 - Is there any nuget package available for c# Naming Convention in Visual Studio Nuget 带有 ARTifactory 的 Visual Studio 中的符号服务器不工作 - Nuget Symbol Server in Visual Studio with ARtifactory is not working 从 Visual Studio 中对 Artifactory 上的 NuGet 进行身份验证 - Authentication to NuGet on Artifactory from within Visual Studio Visual Studio + nuget + TFS:检查nuget包? - Visual Studio + nuget + TFS: checking in nuget packages? 在 Visual Studio 中使用 Artifactory nuget 提要 - 如何在 package 管理器中获取相关搜索结果? - Using an Artifactory nuget feed in Visual Studio - how to get relevant search results in the package manager?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM