Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to handle a common library in TFS & share dlls

I have 2 different applications set up in tfs source control. Both share a common library, also set up in source control.

The current process for changes to the common library is build it, copy across the dll's to a location for the other applications to pull in and work with. This is manual and does not work well, especially now that I am moving to TFS CI Builds.

Layout like this in TFS:

-TFS
   - Web 1
      | Main
      | RB_1_0
   - Web 2
      | Main
      | RB_1_0
   - Shared
      | Main
      | RB_1_0
      | RB_2_0
      | RB_3_0

So I am looking to change this, automate it. But not sure how I can do such. As you can see there are multiple branches etc. As its a common library I was considering to set up like I work with nuget packages, where changes are pushed to my web 1 and/or web 2. I am not sure how easy it is to set this up.

Would be possible to review the above structure and give opinion on the best way to manage the distribution of the outputted dll's from common? In a CI environment? Is Nuget the best option?

like image 919
amateur Avatar asked Oct 21 '12 18:10

amateur


People also ask

What is library in TFS?

Library is a collection of shared build and release assets for a project. Assets defined in a library can be used in multiple build and release pipelines of the project. The Library tab can be accessed directly in Azure Pipelines and Team Foundation Server (TFS).

What is Microsoft TFS used for?

Overview of TFS Microsoft develops a Team Foundation Server or TFS to manage the teams and the way they work. It is basically a management tool used in project management, reporting, requirements gathering and testing. It actually covers the entire software development life cycle and operates in Microsoft Windows.

What makes TFS user-friendly?

Since windows are a user-friendly platform, it makes TFS user-friendly too. Since TFS is a CVCS (aka Centralized Version Control System), it makes the developer work easy in several ways, one of which is repository details information. There is no chance of losing data to have a copy of the repository file system hosted centrally.

What are task groups and service connections in TFS?

Task groups and service connections are available to build and release pipelines in TFS 2015 and newer, and in Azure Pipelines. All assets defined in the Library share a common security model. You can control who can define new items in a library, and who can use an existing item.


1 Answers

NuGet is what I use for this.

Modify the build process to create new packages for the common package

Add an activity to build a nuget package, and another that copies it to a network share you use as a NuGet repository. There's a few projects floating around like Tfs NuGetter that can be used instead of manually editing the build template.

If you don't want to modify your build template then you could use a tool like [tfs deployer] and write a custom deployment script that creates NuGet packages instead. Or write something that hooks into the build complete event.

Enable Restore Packages on build for all solutions

This means you don't need to store the packages in source control, or deal with packages not downloading when you get latest on the solution.

When you want to update the version of the dependency open the solution and update it like any normal NuGet package.

like image 131
Betty Avatar answered Oct 03 '22 08:10

Betty