Of Code and Me

Somewhere to write down all the stuff I'm going to forget and then need

How to include dlls added by NuGet package manager in a git repository November 26, 2010

Filed under: Git,Visual Studio — Rupert Bates @ 9:28 am

If you have excluded dll files from your git repository with your .gitignore file but DO want to include them when they have been added via the NuGet package manager, you can add this after the dll exclude.

# Include dlls if they’re in the NuGet packages directory
!/packages/*/lib/*.dll

Advertisements
 

2 Responses to “How to include dlls added by NuGet package manager in a git repository”

  1. Paige Cook Says:

    Thanks this was what I was looking for. But there are some cases where the dll files are in network specific folders under the /packages/*/lib folder. So for those, you will need to add the second line below also…

    # Include dlls if they’re in the NuGet packages directory
    !/packages/*/lib/*.dll
    !/packages/*/lib/*/*.dll

  2. […] that I’d also have to handle DLLs and other files and references set up by NuGet – this blog entry has the following […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s