© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
2 replies
Brady Kelly

✅ Add NuGet packages to Git

I'm frequently offline and this is driving me nuts. Last night I did a git reset in a temper tantrum and NuGet threw its toys. Now I thought I could just go and add
<project>/packages
<project>/packages
to my repo, but that folder doesn't exist. I can only find
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
and
C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
. The latter doesn't look promising but I could maybe, at a push (it makes me queasy), add the SDK one.

Yet I'd rather not make a bad situation worse by including all projects' packages to git for one project. Surely there is a way I can configure NuGet to use a
packages
packages
folder again? When I set the local packages folder to
packages
packages
and do a restore, then click the link for
packages folder
packages folder
I get taken the global packages folder,
C:\Users\brady\.nuget\packages
C:\Users\brady\.nuget\packages
, and the confgured local folder
<project>/packages
<project>/packages
still doesn't exist. Either Rider or I have a case of mistaken identity here, but to me, local bloody means local.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Nuget packages
C#CC# / help
15mo ago
Help with NuGet Packages
C#CC# / help
2y ago
❔ Globally Update Nuget Packages
C#CC# / help
3y ago
API versioning from NuGet Packages
C#CC# / help
2y ago