Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
How to properly share a VS project with references to another computer

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Direct reference

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.

  1. Put the library into a folder, e.g. ThirdPartyLibs.
  2. Add the file to git (e.g. with git add).
  3. Add the reference to project with Add Reference... and point to the file file in the newly created folder. You may want to set it up as Copy Local.

Nuget way

One option is to have a local nuget source:

  1. Package a library as nuget package and put in a local folder inside your git repo, e.g. MyLocalNuget

  2. 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>
    
  3. Add the library to the projects using normal NuGet way.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!