Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Enable Ignore of NuGet Packages Folder By Default #969

Merged
merged 1 commit into from

6 participants

@MisterJames

Submitting this for consideration.

The first thing that I do on every new project is to go in and uncomment the packages folder. With the prevalence of NuGet and prominence of its use in the Visual Studio environment, along with how well package restore just works now, I believe this should be the default.

While I understand that package restore isn't on by default, I would argue that the types of developers using NuGet and a distributed SCM are the types of developers that would omit the binaries from source control.

@MisterJames MisterJames Enable Ignore of NuGet Packages Folder By Default
Submitting this for consideration.

The first thing that I do on every new project is to go in and uncomment the packages folder. With the prevalence of NuGet and prominence of its use in the Visual Studio environment, along with how well package restore *just works* now, I believe this should be the default.

While I understand that package restore isn't on by default, I would argue that the types of developers using NuGet _and_ a distributed SCM are the types of developers that would omit the binaries from source control.
5efebe2
@aroben
Admin

@github/windows What do you guys think?

@Haacked
Admin

While I understand that package restore isn't on by default

Actually, it is on by default in the latest builds. See http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html

That makes me inclined to agree even more with this.

@Haacked Haacked merged commit 22f0d93 into from
@niik
Admin

I'm a bit reluctant. It's been raised a bunch of times and there's strong feelings all around

See

#690
#233
#664
#285
#331

This merits thoughtful discussion. I agree that it makes more sense if it's on by default but there's gonna be plenty of users out there that still commit packages.

@Haacked Haacked referenced this pull request from a commit
@Haacked Haacked Revert pull request #969 5c1b470
@Haacked
Admin

I think the difference now is that package restore is always on and it's a part of Visual Studio. Committing packages leads to bloated repositories that then get pushed to GitHub and could contribute to wasted space and oversized repos. If folks know enough that they still want packages committed, I think they will know enough to change the ignore file.

@MisterJames

Yeah, I'm in the camp that it should be "opt-in" to push binaries, and I wasn't aware of the change (thanks for the link @Haacked).

There is the argument that you have to be online to restore, but it doesn't hold a lot of water with me; how are you pulling your repo down if not connected anyways?

Someone made the argument that you now take a dependency on the packages server, which would be a problem if you can't get an internet connection or a connection to that package server. Sure, NuGet has had its outages, but I'd argue that if you're in a time crunch scenario and trying to restore packages to build on a machine that somehow doesn't have the packages required, there's likely other workflow problems to overcome anyways.

@half-ogre

I think the difference now is that package restore is always on and it's a part of Visual Studio

@Haacked, has this been in the wild long enough to make a change based on that feature? Also, it won't work out-of-the-box for CI (granted, I think that's okay.)

Someone made the argument that you now take a dependency on the packages server

I think it's okay folks who care about that (I'm one) to have to make the change in the .gitignore. Plus NuGet caches the packages.

@Haacked
Admin

@Haacked, has this been in the wild long enough to make a change based on that feature?

Hard to say. What's long enough? This feature came in 2.7 which was released in 2013-08-22, roughly 6 months ago. Six months is good enough for me. :smile:

@bbodenmiller

+1

I also think that logically !packages/repositories.config should be uncommented by default also.

@arcresu arcresu referenced this pull request
Closed

Revert pull request #969 #1027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2014
  1. @MisterJames

    Enable Ignore of NuGet Packages Folder By Default

    MisterJames authored
    Submitting this for consideration.
    
    The first thing that I do on every new project is to go in and uncomment the packages folder. With the prevalence of NuGet and prominence of its use in the Visual Studio environment, along with how well package restore *just works* now, I believe this should be the default.
    
    While I understand that package restore isn't on by default, I would argue that the types of developers using NuGet _and_ a distributed SCM are the types of developers that would omit the binaries from source control.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 3 deletions.
  1. +2 −3 VisualStudio.gitignore → IgnorePackages
View
5 VisualStudio.gitignore → IgnorePackages
@@ -123,9 +123,8 @@ publish/
*.azurePubxml
# NuGet Packages Directory
-## TODO: If you have NuGet Package Restore enabled, uncomment the next line
-#packages/*
-## TODO: If the tool you use requires repositories.config, also uncomment the next line
+packages/*
+## TODO: If the tool you use requires repositories.config uncomment the next line
#!packages/repositories.config
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
Something went wrong with that request. Please try again.