Coffeehouse Thread

11 posts

Thoughts on NuGet?

Back to Forum: Coffeehouse
  • User profile image
    vesuvius

    I have been working on a new machine on an inherited project, and find myself almost splitting blood at NuGet.

    I think that the old way is still best, in ensuring that any dependencies that an application has, can be saved into a folder and checked into source code. it just saves so much time. If a new starter arrives, you can just point them to a folder and within a very short space of time (well in truth, an hour or so), they can be sure they have the correct dependencies.

    As it is (WCF Data Services and your file versions) I have wasted a couple of days tring to get a project to compile, and the notion of cloud based dependency is soon to become like an app store, where you are just flooded with URL's.

    I think NuGet was a very good move, but people (Microsoft included) should still make available software like Entity Framework as something that will allow people to store in their source code repositories.

  • User profile image
    blowdart

    , vesuvius wrote

    I have been working on a new machine on an inherited project, and find myself almost splitting blood at NuGet.

    I think that the old way is still best, in ensuring that any dependencies that an application has, can be saved into a folder and checked into source code. it just saves so much time. If a new starter arrives, you can just point them to a folder and within a very short space of time (well in truth, an hour or so), they can be sure they have the correct dependencies.

    As it is (WCF Data Services and your file versions) I have wasted a couple of days tring to get a project to compile, and the notion of cloud based dependency is soon to become like an app store, where you are just flooded with URL's.

    I think NuGet was a very good move, but people (Microsoft included) should still make available software like Entity Framework as something that will allow people to store in their source code repositories.

    But Nuget packages can be stored in source control - it's just they're not included in the project, but in a Packages directory under the solution folder. So if you want to check them in, you can.

     

  • User profile image
    MasterPi

    NuGet does a lot of neat things like resolve dependencies (actually downloading the additional packages needed and the right versions). Makes it really easy if you want to change to a different version...just modify packages.config.

    I really loved RubyGems in RoR, which I think influenced NuGet. One thing you could do in RubyGems was freeze all your included gems (and any manual configuration) so that you could check them in to source control. In fact, I think the /packages directory in Solution root stores the dlls NuGet downloads.

    EDIT: superblowdart beat me to /packages

  • User profile image
    OrigamiCar

    On the whole, we like nuget and have moved over to it for all our newest projects.

    There is a pretty nasty bug/flaw with it though that caught us out. If you have multiple solutions in the same folder then one solution will stomp all over the other one and vice versa and mess with the packages. Nuget obviously expects solutions to be in their own folders.
    This caught us out really badly at first, as our TFS system is set up with the solution files for each of our main applications all to be in the root of the TFS store. Probably not a best practice, but that's how we've done it for the last 7 years.
    Moving the solutions into a 'solutions > solutionname' folder has solved this problem, but it was a hassle to begin with.

    The other thing we wish was better would be a way to right click and refresh a nuget reference. Right now it's 'install' or 'uninstall' only (or 'update' if there's a newer version). We keep running in to nuget  references that mess up and we have to remove and re-add them. Not a huge deal, but would be nice to right click and say 'refresh all nuget packages'.

    Other than that, we like it.

  • User profile image
    MasterPi

    , OrigamiCar wrote

    There is a pretty nasty bug/flaw with it though that caught us out. If you have multiple solutions in the same folder then one solution will stomp all over the other one and vice versa and mess with the packages.

    That's because both solutions point to a /Packages directory for NuGet, which is in this case, the same directory.

  • User profile image
    Harlequin

    The VS2012 package interface could be better. The search is quite bad, even if you search for the exact name of the package you still get 20 pages of results, and your the package whose title exactly matches the search you made is on page 9. Search should be title, then meta data.

  • User profile image
    OrigamiCar

    @MasterPie:

    , MasterPie wrote

    *snip*

    That's because both solutions point to a /Packages directory for NuGet, which is in this case, the same directory.

    Yup - that's right. Would prefer if it had been designed to name the folder '<solutionname>_packages' or something else unique to each solution - that way changes from one solution would never overwrite another.
    Not a huge problem in the grand scheme of things, more a niggle.

  • User profile image
    JoshRoss

    Is there a way to drag a folder into TFS in VS2012? or do I have to manually create folders and move 79 items into it?

  • User profile image
    Adam​Speight2008

    Why do a lot people of assume NuGet is just for Visual Studio and programming?

    It's a Package Manager, there's nothing stop you using it for Managing Packages of other things. Say documentation auto-magically have up-to-date documentation. Eg Company Policies / Health & Safety Docs or Issuing of Comics. 

    Distribution of game levels.  

  • User profile image
    kettch

    @AdamSpeight2008: I also just found out about chocolatey from Brian Harry's blog. I haven't dug into it, but it looks promising.

  • User profile image
    JohnAskew

    , kettch wrote

    @AdamSpeight2008: I also just found out about chocolatey from Brian Harry's blog. I haven't dug into it, but it looks promising.

    Chocolatey NuGet, mmmmmm......

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.