如何将Nuget软件包推向在线服务器位置

发布于 2025-02-13 20:33:32 字数 943 浏览 3 评论 0原文

我刚刚创建了一个.NET类库,需要将其转换为Nuget软件包。我可以为nuget创建本地路径并将其推在那里。但是,我需要团队中的其他成员才能访问它,以便他们可以在项目中使用它。因此,我决定将其推到我的一个网站中的一个子目录中。

因此,我创建了 https://www.example.com/nuget.com/nuget 并运行以下cli命令

dotnet nuget push C:\Users\User1\source\repos\ProjectFolder\bin\Debug\LibraryName.1.0.0.nupkg -s https://www.example.com/nuget

并获得了以下响应

put https://www.example.com/nuget.com/nuget/
OK https://www.example.com/nuget/ 1537MS
您的包裹被推了。

但是,当我尝试添加包裹时,它会引发错误,然后检查了位置,并发现该软件包不在那儿,无论我收到的响应消息说“您的软件包已被推开”。

请我如何在网站上使用子目录来存储我的Nuget软件包,并可以通过Visual Studio Package Manager或其他方式从我的应用程序中访问它?

谢谢

I have just created a .Net class library which I need to be converted to a nuget package. I can create a local path for the nuget and push it there. However, I need other members of my team to be able to access it so they can use it in their project. So I decided to push it to a subdirectory in one of my websites.

So I created https://www.example.com/nuget and ran the following cli command

dotnet nuget push C:\Users\User1\source\repos\ProjectFolder\bin\Debug\LibraryName.1.0.0.nupkg -s https://www.example.com/nuget

and got the following response

PUT https://www.example.com/nuget/
OK https://www.example.com/nuget/ 1537ms
Your package was pushed.

But when I try to add the package it throws an error and then I checked the location and discovered that the package is not there regardless of the fact that I got a response message that says "Your package was pushed".

Please how can I use a subdirectory in my website to store my nuget package and be able to access it from my application either from Visual Studio Package manager or other means?

Thank you

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

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

发布评论

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