Reputation: 9279
We have several C# .Net apps in TFS and using Visual Studio 2013. I am relatively new to TFS and realize this may be a duplicate question. I'm sure someone else has had the same issue/thought. All of which have common shared dll's (i.e. System.Web.MVC.dll) as well as common libraries that we have built in-house (i.e. our_common_lib.dll). Of course, we would love to store only one version of these common dll's in TFS and reference/link all the projects to these common dll's so that when we branch or create new projects, they automatically pull in these shared dll's. In a previous life, I did this in ClearCase (yes, that old). How can we do this in TFS? (If this is a dupe, just point me there)
Upvotes: 1
Views: 1207
Reputation: 199
If your our_common_lib.dll is a project then you can add this project to your solution(s) and then reference it that way. This way it will get built with your main solution(s) and included in the output.
If this is not the case, the way I have done this in the past is to have a folder in TFS that contains the dlls in question. You can then select them as references in your project(s) using browse in the add reference screen.
system.web dlls should not need to be included as a checked in DLLs in TFS as they are .NET dlls and should be available in the add reference screen under assemblies or through NuGet.
Hope this helps!
Upvotes: 0
Reputation: 4202
There are several ways to distribute it. Maybe you can then install/register the binaries in the GAC of every client.
Another approach could be (if you need more frequent updates) to store the binary in source control in a shared location. Every project uses the file from the shared location.
You could also use Nuget packages. Package those common dlls into a Nuget package. If you are're using TFS 2015 and upper version, you could use upload this package to a Feed on TFS package site. Then add this feed setting in Nuget.config file on each of your client. Then you could install those packages from your Feed on TFS. For more detailed information, you could refer to: https://www.visualstudio.com/en-us/docs/package/build/team-build-nuget
Similar issues that you could refer to:
TFS 2010 Branch Across Team Projects - Best Practices
Shared Libraries branched across team projects - Best Practices
Upvotes: 3