简体   繁体   English

我可以发布私有NuGet包吗?

[英]Can I publish a private NuGet package?

I have an assembly that I have made which is very specific to my team at my company. 我有一个我已经制作的装配,这对我公司的团队非常具体。 I want to be able to use NuGet to make this assembly avaiable to other projects that my team and similar teams at my company are working on. 我希望能够使用NuGet使这个程序集可用于我的团队和我公司的类似团队正在开展的其他项目。 However, the assembly isn't really code that I want to share with the world. 但是,程序集并不是我想要与世界共享的代码。

I know with Maven, you can create local repositories and source packages from a local repo. 我知道使用Maven,您可以从本地仓库创建本地存储库和源包。 Does NuGet support similar functionality? NuGet是否支持类似的功能? Is there a way with NuGet to specify either a local repository or to have private packages? 有没有办法让NuGet指定本地存储库或拥有私有包?

Yes! 是! You can host your own NuGet server! 您可以托管自己的NuGet服务器!

The easiest way is creating a shared folder on your server and referencing that as your Nuget Server. 最简单的方法是在服务器上创建共享文件夹,并将其作为Nuget Server引用。

You can find more information about how to do that at: Hosting Your Own NuGet Feeds 您可以在以下位置找到有关如何执行此操作的更多信息: 托管您自己的NuGet Feed

Another option for hosting your own NuGet server is to use JetBrains TeamCity as a build server. 托管您自己的NuGet服务器的另一个选择是使用JetBrains TeamCity作为构建服务器。 The setup is described here . 此处描述设置。

The Team City server acts as a NuGet repository that would/could/should only be accessible within your company. Team City服务器充当NuGet存储库,该存储库将/可能/应该只能在您的公司内访问。

Based on your usage, there are free versions of the software. 根据您的使用情况,该软件有免费版本。

It has some nice options such as the ability to publish a new NuGet version on demand, with each new continuous integration build, etc. One of the most useful bits (as with all NuGet server implementations) is that it will keep dozens of older versions of your assemblies so if you have one project that needs to reference the newest version, and another project that needs to reference an older version, everything will work out. 它有一些很好的选择,例如能够按需发布新的NuGet版本,每个新的持续集成构建等等。最有用的一点(与所有NuGet服务器实现一样)是它将保留几十个旧版本你的程序集所以,如果你有一个需要引用最新版本的项目,另一个需要引用旧版本的项目,一切都会解决。

Check out the ProGet free edition ; 查看ProGet免费版 ; we built it exactly for this purpose. 我们正是为此目的而建造的。 It takes much less time to setup and offers many features above and beyond those offered by the standard NuGet server, such as multiple feeds, feed aggregation, and additional repository types (npm, Bower, etc.) 设置所需的时间要少得多,并且提供的功能超出了标准NuGet服务器提供的功能,例如多个Feed,Feed聚合和其他存储库类型(npm,Bower等)

If you want to pay for the enterprise version, you also get the ability to use LDAP for authentication, and the ability to filter feeds by name/license from connected feeds (ie NuGet's official feed). 如果您想为企业版付费,您还可以使用LDAP进行身份验证,并能够根据连接的Feed(即NuGet的官方订阅源)按名称/许可过滤Feed。

Yes, you can have local feeds. 是的,您可以拥有本地供稿。 It's dead-simple to set up, take a look here . 设置起来很简单, 看看这里

MyGet is popular for hosting private feeds. MyGet非常适合托管私人Feed。 It's not free, but take a look at their pricing and maybe it suits you well! 这不是免费的,但看看他们的定价 ,也许它很适合你!

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

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