简体   繁体   中英

Visual Studio reference separate git project

Example

  • C# Project A is stored in internal Git Repository A
  • C# Project B is stored in internal Git Repository B but references Project A

Question

What is a simple way for Project B to reference a Project A?

Options considered

  • Install, configure, and deploy internal NuGet server
  • Check Project A's dll into git and use npm since it has the ability to add a dependency directly to a git url (including version)
  • Use git submodule
  • Use git subtree
  • Copy Project A's dll manually into Project B

I'd suggest Nuget, but you don't need a server. Nuget can work from a simple local folder. Setting it up takes one minute. Set up a git repo for the packages and clone it on your machines. In VS, Tools->Options->Nuget, configure a new package repository pointing to your local folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM