With these config settings you can create a .nuget
folder in the root of your project and install packages without using a nuget server. This could be expanded on using newer features in NuGet v6 to map individual packages to a source to guaranteee you don't accidentally install one from a remote server.
.gitignore
# Using this as the starting point https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# Add this at the end
!.nuget/*.nupkg
nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="local" value=".nuget" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>