简体   繁体   English

如何将 nuget 包推送到在线服务器位置

[英]How to push nuget package to an online server location

I have just created a .Net class library which I need to be converted to a nuget package.我刚刚创建了一个 .Net 类库,需要将其转换为 nuget 包。 I can create a local path for the nuget and push it there.我可以为 nuget 创建一个本地路径并将其推送到那里。 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所以我创建了https://www.example.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

and got the following response并得到以下回复

PUT https://www.example.com/nuget/https://www.example.com/nuget/
OK https://www.example.com/nuget/ 1537ms好的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?请我如何使用我网站中的子目录来存储我的 nuget 包,并能够从我的应用程序从 Visual Studio 包管理器或其他方式访问它?

Thank you谢谢

考虑开源项目: https ://github.com/loic-sharma/BaGet 和参考配置: https ://loic-sharma.github.io/BaGet/installation/local/

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM