Y.S
Y.S

Reputation: 1862

Visual Studio 2010 - Reference to dll in TFS

I have a c# project which references some dll.

I want to check in that dll into TFS, to an "Assemblies" folder, and set the reference to that path.

Is this possible?

Upvotes: 1

Views: 583

Answers (2)

Erik Funkenbusch
Erik Funkenbusch

Reputation: 93464

Personally, I don't like checking binaries into version control. I only do so when I have no other choice, and if I do I would tend to create a custom nuget package and check that nuget package project into version control, build the package then push it to either a local nuget repository (either a local nuget server, or a binary repository like artifactory or sonatype nexus both of which have open source free versions) or an online nuget repository like ProGet or MyGet.

Then I would use Nuget in package restore mode to download the reference as needed when building.

If you don't want to use Nuget for some reason (and trust me, you should use it, and get past any arguments for why not to use it), then check the DLL into each project that needs it and reference it relatively from the project.

As a last resort, if none of those options will work for you, I would check the DLL into an "archive" folder somewhere in version control, then just copy that file somewhere on your network to be referenced in your project. This way the file is in version control, and has an absolute reference, but only a single copy in source control... but this will require that someone "remembers" all this, and keeps it up to date.

Upvotes: 2

Eddie
Eddie

Reputation: 456

Typically Version Control Systems do not care what you add to them.

In the past I've typically created a Lib or Library folder to house all of my third party DLLs. This folder is typically created in your Solution or Project. You could then add those files to Source Control.

More recently, I've created Nuget packages for all of my DLLs. This is so I do not have to check them in directly into a Version Control System. Instead, I let Nuget manage my DLL dependencies. Using the Nuget Config and Packages file, you can tell your Solution/Project what files are needed and where to get them. This way you do not bloat your VCS with DLLs.

Upvotes: 0

Related Questions