简体   繁体   English

我如何(以及何时)将TFS与私有DLL一起使用,也可以由NuGet / NuPack提供服务?

[英]How (and when) do I use TFS with private DLLs that can also be served by NuGet/NuPack?

We have a couple of private "Enterprise Services" DLLS that are used in all our Websites for authentication, logging, etc. Since they are private, we also control the versioning and source of these DLLs. 我们有一些私有的“企业服务”DLLS,在我们所有的网站中用于身份验证,日志记录等。由于它们是私有的,我们还控制这些DLL的版本控制和源代码。 Our historic (error prone) steps after creating File | New Project 创建File | New Project后,我们的历史性(易出错)步骤 File | New Project include File | New Project包括

  1. Add the "Enterprise Services" project 添加“企业服务”项目
  2. Add a reference to above 添加对上面的引用
  3. Edit web.config sections such as Authentication, HttpHandlers, etc... 编辑web.config部分,例如Authentication,HttpHandlers等......

NuGet will automate the above process NuGet将自动执行上述过程

I just came across NuGet (bundled in MVC3) which allows me to download and install VS2010 packages from a privately hosted server, and automate the config settings that previously would have made manually. 我刚刚遇到NuGet (捆绑在MVC3中),它允许我从私有托管服务器下载和安装VS2010软件包,并自动完成以前手动设置的配置设置。

Question: 题:

  • Does it make sense to publish my dll into a private NuGet server? 将我的dll发布到私有NuGet服务器是否有意义?
  • Will I lose the ability to debug and step into this dll if I need to? 如果需要,我是否会失去调试并进入此dll的能力?
  • What other things should I consider if the rest of my project is based in TFS? 如果我的项目的其余部分基于TFS,我应该考虑哪些其他事项?

Yes, it makes sense for you to have a private NuGet feed 是的,你有一个私人NuGet饲料是有道理的

I'm not sure about stepping into the dll, but if you provide PDBs in your NuGet package as well as the library sources on a share (and then configure VS to know where those sources are) then you should be able to step into the code just like you can today for the .NET framework itself. 我不确定是否会进入dll,但如果您在NuGet包中提供PDB以及共享上的库源(然后配置VS以了解这些源的位置),那么您应该能够进入代码就像今天的.NET框架本身一样。

NuGet was designed to work well with projects that are mapped to source control so hopefully there's nothing else you need. NuGet旨在与映射到源代码控制的项目一起使用,因此希望您无需任何其他内容。

I agree with marcind: having a private feed make sense. 我同意马克林德的观点:拥有私人饲料是有道理的。

My 2 cents are that you don't need to configure a private server: configuring your VS to target a shared folder is enough for distributing the packages and it will be easy to update with your TFS builds: just create the NuGet package and drop it into the shared folder. 我的2美分是您不需要配置私有服务器:配置VS以定位共享文件夹就足以分发软件包,并且使用您的TFS构建很容易更新:只需创建NuGet软件包并将其删除进入共享文件夹。

Keep in mind that, for the latest NuGet bits that I tested, the client (both the console and the gui) does not look into other feeds for locating the dependecies so it will complaint that it can't resolve them automatically: you'll have to install them by hand. 请记住,对于我测试的最新NuGet位,客户端(控制台和gui)都没有查看其他用于查找依赖项的源,因此它会抱怨它无法自动解决它们:您将必须手动安装它们。

只要您没有使用特定的存储库,@ Ghidello NuGet就会自动解决依赖关系(控制台中的包源下拉列表设置为All而不是您的私有存储库)

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

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