简体   繁体   English

TFS,NuGet,程序包还原查找需要更新的项目?

[英]TFS, NuGet, Package Restore Finding projects that needs to be updated?

So the past few days i've been setting up NuGet, making packages of our internal libraries, updating our projects, getting our TFS Build server to Build. 因此,在过去的几天中,我一直在设置NuGet,制作内部库的程序包,更新项目,将TFS Build服务器安装到Build。 all of this is awesome! 所有这些都很棒! Now I have a problem though, before NuGet and package restore I could search TFS for the .dll files, as an example I could search for Company.Common.dll in TFS and find all projects that utilized this dll with the following command: 现在,我遇到了一个问题,在恢复NuGet和程序包之前,我可以在TFS中搜索.dll文件,例如,我可以在TFS中搜索Company.Common.dll,并使用以下命令查找所有使用此dll的项目:

tf dir "$/*Company.common.dll" /recursive /server:http://tfs-server:8080 tf目录“ $ / * Company.common.dll” /递归/服务器:http:// tfs-server:8080

Now after we have started using NuGet and using package restore the dll file Company.Common.dll will not be present in TFS in the projects that uses it. 现在,在我们开始使用NuGet并使用程序包还原之后,dll文件Company.Common.dll将不会在使用它的项目中的TFS中出现。 that means I can't use the above search command to find the .dll file I want to update 这意味着我无法使用上面的搜索命令找到要更新的.dll文件

I was contemplating writing a powershell script that would find all packages.config files in TFS and download them to a folder structure indicating where in TFS the different projects are located. 我正在考虑编写一个Powershell脚本,该脚本将在TFS中找到所有package.config文件,并将它们下载到一个文件夹结构中,以指示不同项目在TFS中的位置。 Then I would traverse the packages.config file to figure out what projects used the specific NuGet package I wanted to update. 然后,我将遍历packages.config文件以找出哪些项目使用了要更新的特定NuGet软件包。

The reason for this is ofcourse that all our projects should have the Common.dll updated when there is an update too it. 当然,这样做的原因是我们所有的项目也都应该在更新时也更新Common.dll。

What I would like to know is if anyone has already solved this "problem", so I don't have to invent the wheel again, or perhaps have some perspective or constructive comments on this. 我想知道的是,是否有人已经解决了这个“问题”,所以我不必再次发明轮子,也不必对此有一些看法或建设性意见。 I guess the core question is this: 我猜核心问题是这样的:

How do you handle updating a package across ALL projects, when there are multiple teams that create / update projects in TFS? 当有多个团队在TFS中创建/更新项目时,如何处理所有项目中的软件包更新?

One solution would be to use the "repositoryPath" NuGet config settings and make it point to a central UNC share. 一种解决方案是使用“ repositoryPath” NuGet配置设置,并使其指向中央UNC共享。 More details here @ http://docs.nuget.org/docs/release-notes/nuget-2.1 . 更多详细信息,请参见http://docs.nuget.org/docs/release-notes/nuget-2.1

You can use NuGet.exe Update packageName -RepositoryPath xxx -Source xxx command to update the specific package if needed. 如果需要,可以使用NuGet.exe更新packageName -RepositoryPath xxx -Source xxx命令来更新特定的软件包。

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

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