Using Packages with Version Control

Package Management Systems give us the option of not always committing all the libraries that a project needs into version control.

Open folder in file explorer. And assume we are already committing our project into control system like GitHub.

  1. Close Visual Studio.
  2. Typically, we don't committing bin and obj folder. So, we delete it in JsonToDb and databaseModels projects.
  3. Delete .vs folders too.
  4. "Packages" directory contains all of the assemblies outside .NET framework.
  5. When we're using NuGet, we don't need to commit these to version control either. So, delete it.
  6. Our solution contains only 3 items if we just cloned it from version control system.
  7. Double click on solution file to open VS.
  8. We'll see yellow triangle. It means all the references / assemblies couldn't be found.
  9. Try to build the solution. Runs perfectly?
  10. Because we using NuGet to manage our dependencies for us. It automatically fetches the packages we need and put them back in solution folder.
  11. NuGet didn't have to go out the internet to fetch all those. It caches the packages that previously installed in our local folder.

results matching ""

    No results matching ""