Howard Pinsley
Howard Pinsley

Reputation: 11478

Where should external assemblies be place in my Visual Studio solution so that they are part of source control?

I have a multi-project solution. I believe it is best practice to put all externally referenced assemblies (e.g. OSS stuff) in a folder that is on the relative path of the solution and it's component projects.

I'd like to create a real folder called Libs within the same Windows folder that contains my .sln file and add it to source control (Team System). I can't seem to figure out how to do this from the Solution Explorer. I can only do this from the Source Control Explorer. There does not appear to be a way to add this Libs Windows folder directly to the solution itself.

I see that you can create a "solution folder" -- but this does not correspond to a real windows folder and it apparently places the files within the top level solution folder.

I was wondering if there was a way to add the Libs folder to the solution so that it was apparent it was there and referenced by the component projects.

Upvotes: 3

Views: 1688

Answers (5)

battaile
battaile

Reputation:

"Thanks Micah. The Add As Link option I think is new with VS2008. Alas, this is a VS2005 project and I don't see it. "

You can't use "Add as Link" within solution folders anyway.

Upvotes: 0

Richard
Richard

Reputation: 1800

Take a look at the Streamed Lines paper it suggests a number of structural patterns for dealing with third party dependencies

Upvotes: 0

Martin Marconcini
Martin Marconcini

Reputation: 27236

For what is worth, we have a "PrecompiledLibraries" folder (what Micah called Binaries) outside the solution, and we reference there. If a new external lib changes, we simply place it in, relink, test and recompile. If everything is ok, commit and voila.

Upvotes: -1

Kon
Kon

Reputation: 27441

I've typically seen third-part DLLs placed in a "ThirdParty" folder outside of any specific project in source control. Then in your project reference it from the "ThirdParty" folder and make sure Copy Local property of the reference is set to true.

Upvotes: 0

Micah
Micah

Reputation: 116140

Here's my structure in TFS

Development/
   Trunk/
      Binaries/  -- Shared libraries
      Source/
      Test/      
      Docs/      -- Documentation
      TeamBuildTypes/  -- Build definitions

You cannot do what you want directly in visual studio with the projects. The best thing you can do is create an external folder, plece the libraries in there, THEN add a solution folder and "Add Existing Item", and then select the libraries and click "Add As Link". It's actually hidden in the dropdown of the "Add" button. Click the little arrow and it will give you the option to "Add as Link".

Upvotes: 3

Related Questions