I have a project here that compiles fine, but it uses a reference to a DLL that is not from NuGet. I added it using References-Add Reference-Browse.
Unfortunately, the reference appears (from clicking on properties of the reference in Solution explorer) that the DLL location is [project dir\bin\debug] and [project dir\bin\release]. These don't seem appropriate directories to add to source control to share to another computer. It also doesn't seem right that I would add both directories.
So the end result when I transfer to another computer, is of course "are you missing a reference?".
What I want to do: Put the reference in a directory under my solution, add it to source control, and add the reference to Visual Studio using that path.
I can't see how to accomplish this, or anything like it, except to add the DLL in every build configuration directory to source control.
I think what you're doing is almost correct. You just have to make sure that when you add the reference you point to the right file.
ThirdPartyLibs.git add).Copy Local.One option is to have a local nuget source:
Package a library as nuget package and put in a local folder inside your git repo, e.g. MyLocalNuget
Add NuGet.config at the solution level. Example:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="Local NuGet" value="MyLocalNuget"/>
</solution>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Add the library to the projects using normal NuGet way.