Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manage references in source control with Visual Studio

I'm having trouble managing my .dll references in projects in Visual Studio. All the registered .NET and COM references work fine but when it comes to .dll files on disk, if I refer to my files on disk, my colleagues will be missing references because they may have it in a different location on disk etc. Does Visual Studio have a environment variable like $PATH or something so that each computer have paths it will look in first before saying that it can't find a reference? Or is keeping the .dll references in the source control a better option?

Ok, it worked perfectly. In VS, I just added a folder to the solution, added the dlls to the folder and added everything to source control. I referred to those dlls in individual projects and when I get the latest version from other computers, it linked properly. Thanks guys

like image 807
xster Avatar asked Dec 17 '22 23:12

xster


2 Answers

This works for me, both in subversion and VSS.

\root
    \trunk
       foobar.sln (solution file goes here)
        \References
            foo.dll (3rd party, ie. you don't compile this)
            bar.dll
            (Don't put dll's for Project 1 here, Visual Studio will take care of it)
        \Project1
           .proj file goes here
              \bin  (don't put dll's here!)
        \Project2  (This might reference Project1

Don't put dll's into \bin because repositories like VSS like to make them readonly, which interrupts clean and re-build.

Visual Studio doesn't understand dependencies above the solution level, so if you have solutions that depend on solutions, you'll have to show that in your build scrips/build server.

like image 124
MatthewMartin Avatar answered Jan 01 '23 07:01

MatthewMartin


I like to add a solution folder the the solution, which I then place all my external DLL's in. From there I reference that rather than a specific folder on PC.

So yes they are in source, but why not. Especially when managing updates.

Works great for me.

like image 43
Dustin Laine Avatar answered Jan 01 '23 05:01

Dustin Laine