简体   繁体   English

TFS和库在nuget中不可用

[英]TFS and Libraries not available in nuget

So we have a ASP.net MVC 4 solution that is composed of the 3 projects BusinessLibrary.UI, BusinessLbrary.Domain, BusinessLibrary.Tests 所以我们有一个ASP.net MVC 4解决方案,它包含3个项目BusinessLibrary.UI,BusinessLbrary.Domain,BusinessLibrary.Tests

We use nuget to manage all of our libraries like json.net, entity, etc. But we also have some private libraries that we have added. 我们使用nuget来管理我们所有的库,如json.net,entity等。但是我们也有一些私有库,我们已经添加了。 What is the best way to manage of the private libraries we have. 管理我们拥有的私人图书馆的最佳方式是什么? I would like to be able to have a new developer to get all the DLL's associated with this project when they start. 我希望有一个新的开发人员可以在启动时获得与该项目相关的所有DLL。

Ive read that I could create a library or lib folder, and then just reference the DLL's to there. 我读过我可以创建一个库或lib文件夹,然后只是将DLL引用到那里。 But should that be checked in with the Project' s Source Control then? 但是,应该使用项目的源代码管理来检查吗? Would I only want to copy over the non-nuget private libraries. 我只想复制非nuget私有库。 Is this the best way to go? 这是最好的方式吗?

What is the standard practice for situations like this, how should I be storing my private libraries? 这种情况的标准做法是什么,我应该如何存储我的私人图书馆?

Personally, I create a dependencies folder at the solution level. 就个人而言,我在解决方案级别创建了一个依赖项文件夹。 I put all non-NuGet libraries that I reference there. 我把我引用的所有非NuGet库放在那里。 When I add the reference, I'm sure to reference the assembly from the dependencies folder. 当我添加引用时,我肯定会从dependencies文件夹中引用程序集。 Make sure you add the dependencies folder to Source Control. 确保将依赖项文件夹添加到源代码管理。

That way any developer pulling down the solution from Source Control will automatically have the correct version of all of the dependencies. 这样,从Source Control中下拉解决方案的任何开发人员都将自动拥有所有依赖项的正确版本。

您可以选择安装自己的NuGet服务器,并在成功构建这些库之后将库放在那里

We create a library directory, add the assemblies there and use relative paths to reference them. 我们创建一个库目录,在那里添加程序集并使用相对路径来引用它们。 We also check in this directory, so every team member immediately has the newest assemblies. 我们还检查了这个目录,因此每个团队成员都会立即拥有最新的程序集。

Another option would be to setup a private NuGet feed (such as MyGet) and publish your assemblies there as packages. 另一种选择是设置私有NuGet提要(例如MyGet)并将程序集作为包发布在那里。

In our project we created lib folder for private dll's and checked in it to TFS along with source code. 在我们的项目中,我们为私有dll创建了lib文件夹,并将其与源代码一起签入TFS。 NuGet packages are added to TFS automatically. NuGet包自动添加到TFS。

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

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