Dependency Management with TFS 2010

What is the best way to manage dependencies with TFS 2010?

EDIT: I would like to know if there is a system like Maven or NuGet that makes it easy to manage .dll dependencies (external or created by our team) inside TFS 2010. However, we face the problem that we want to be able to modify our DLL code and test in real time if they work (without publishing a new package).

+6
source share
3 answers

It is actually quite easy to call NuGet as a pre-build step. You can override the BeforeBuild target in the * file. * Proj for the project using NuGet links.

<Target Name="BeforeBuild"> <Exec Command="&quot;$(SolutionDir)Tools\nuget&quot; install &quot;$(ProjectDir)packages.config&quot; -o &quot;$(SolutionDir)Packages&quot;" Condition="'$(BuildingInsideVisualStudio)'==''" /> </Target> 

As you can see from the above snippet, you will want to download the NuGet command-line utility , put it in a folder under your solution and check it for version control. Note that the executable that you download is actually the bootloader that you want to run once to load the real executable.

Then you will need to check the packages.config file from the project directory, but not the packages folder under your solutions directory. Note that I turned on the check for $ (BuildingInsideVisualStudio), which should not be installed in the previous build step. This will download and install packages during build when you create using the TFS build service (or from the command line). This will not affect your NuGet experience in Visual Studio.

You can search for articles on automating the creation of NuGet packages using TFS - several people have reported this. The combination of these two solutions provides a very effective dependency management solution. Now we just need the NuGet feed built into TFS;).

+7
source

If your question is about managing the external dependencies of a shared lib base project that you create yourself, some people call this branching of the subsystem or dependency replication.

Here are three links to articles that handle this issue:

http://geekswithblogs.net/terje/archive/2008/11/02/article-on-subsystem-branching.aspx

http://blog.ehn.nu/2009/03/implementing-dependency-replication-with-tfs-team-build/

http://blog.ehn.nu/2010/12/dependency-replication-with-tfs-2010-build/

I just had to have this on hand, as I am now looking for a way to handle this.

+6
source

When you create a continuous integration assembly in TFS 2010, the assembly starts whenever something is checked inside one of the source control folders corresponding to the workspace defined for the assembly. You can try to create a source control folder for the DLLs you are using, and then include this folder in the workspace of each project that they need.

When you define CI assemblies and check for a new version of one of these DLLs, this will lead to the creation of the CI of all projects using the DLLs. Of course, the CI assembly will not only generate code, but also conduct unit tests.

+4
source

Source: https://habr.com/ru/post/890945/


All Articles