Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda