私人文物软件包未出现在Visual Studio中

发布于 2025-01-27 01:17:08 字数 1923 浏览 3 评论 0原文

在过去的一个小时中,我使用Visual Studio包装Nuget .nupkg文件,然后使用以下命令将我的.nupkg文件推到私有伪影库:

$ nuget sources Add -Name Artifactory -Source https://myurl/artifactory/api/nuget/ult-testware-nuget -username aaaaaa -password bbbbbb
$ nuget setapikey aaaaaa:bbbbbb -Source Artifactory
$ nuget push ClassLibrary2.1.0.0.nupkg -Source Artifactory

我可以验证它已上传并为在线可见:

我的私人文物URL被添加到VSCODE作为nuget来源:

但是,当我尝试使用该源浏览Nuget软件包时,我没有得到结果。即使检查了预发行,然后在刷新/重新启动后, ”在此处输入图像说明“

我是否需要使用我的私人JFrog Artifactory Repo重新认证Visual Studio?我希望看到并下载我刚推动的Nuget软件包。

我还尝试添加到我的nuget.config文件另一个nuget源:

    <add key="ArtifactoryNuGetV3" value="https://myurl/artifactory/api/nuget/v3/ult-testware-nuget" protocolVersion="3" />
  </packageSources>

但这不起作用。

我添加了一个链接源URL之一,我添加了回购的链接,当我选择它浏览时,我会得到一个弹出式询问用户名/密码的弹出窗口。 在错误的位置搜索我的包裹)

[artifcator2] The V2 feed at 'https://myurl/artifactory/ult-testware-nuget/ClassLibrary2.1.0.0.nupkg/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='netcoreapp3.1'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '404 '.

输入后,我会遇到一个错误,说404(所以我认为该验证是成功的,但是如果我从URL中删除所有内容,则 /ult-testware-nuget/classlibrary2.1.0.0.0.0.nupkg/ 并在我的浏览器中查找,要么显示 404:“ {\” error \ \“:\”期望一个文件夹,但找到了一个文件,at:ult-testware-nuget:classLibrary2.1.0.0.nupkg \“}”,或者如果我删除它开始下载的最后一个斜线

in the past hour I used Visual Studio to package a NuGet .nupkg file, and then used the following commands to push my .nupkg file to a private artifactory repo:

$ nuget sources Add -Name Artifactory -Source https://myurl/artifactory/api/nuget/ult-testware-nuget -username aaaaaa -password bbbbbb
$ nuget setapikey aaaaaa:bbbbbb -Source Artifactory
$ nuget push ClassLibrary2.1.0.0.nupkg -Source Artifactory

I can verify that it was uploaded and is visible online:
enter image description here

My private artifactory url is added to vscode as a NuGet source:
enter image description here

But when I try to browse for NuGet packages using that source, I get no results. Even with prerelease checked, and after refreshing/restarting VS, enter image description here

Do I need to re-authenticate Visual Studio with my private JFrog Artifactory repo somehow? I'm hoping to see and download the NuGet package I just pushed up.

I also tried adding to my NuGet.Config file another NuGet source:

    <add key="ArtifactoryNuGetV3" value="https://myurl/artifactory/api/nuget/v3/ult-testware-nuget" protocolVersion="3" />
  </packageSources>

But that does not work.

One of the artifactory source urls I added links to my repo, and when I selected it to browse, I get a popup asking for username/password. After entering I get an error saying 404 (so I think the auth was a success, but its searching for my package in the wrong place)

[artifcator2] The V2 feed at 'https://myurl/artifactory/ult-testware-nuget/ClassLibrary2.1.0.0.nupkg/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='netcoreapp3.1'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '404 '.

If I remove everything from the url so it is just https://myurl/artifactory/ult-testware-nuget/ClassLibrary2.1.0.0.nupkg/ and look it up in my browser, it either shows
404: "{\"error\":\"Expected a folder but found a file, at: ult-testware-nuget:ClassLibrary2.1.0.0.nupkg\"}" or If I remove the last slash it begins to download

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文