Your SlideShare is downloading. ×
Organize your chickens: NuGet for the enterprise
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Organize your chickens: NuGet for the enterprise


Published on

Managing software dependencies, whether those created in-house or from third parties can be a pain in the behind. Whether dependencies feel like wild chickens or people run around like chickens …

Managing software dependencies, whether those created in-house or from third parties can be a pain in the behind. Whether dependencies feel like wild chickens or people run around like chickens dealing with dependencies, the NuGet package manager can be a cure. Let us guide you to creating enterprise (chicken) NuGets and dealing with them in a structured, easy-to-maintain manner. From developer workstation to build server, NuGet tastes great! We'll provide you the dip sauce.

Published in: Technology

  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • Maarten
  • Maarten
  • Xavier
  • Xavier
  • Xavier
  • XavierMaarten
  • Maarten
  • NuGet Install-PackageWhen you use NuGet to install a package, it copies the library files to your solution and automatically updates your project (add references, change config files, etc). NuGet Uninstall-PackageIf you remove a package, NuGet reverses whatever changes it made so that no clutter is left.
  • Xavier: Terugverwijzen naar “Marketing versioning”
  • Xavier
  • Maarten
  • Maarten
  • Maarten
  • XavierStart with empty MVC template + addNuGet.ServerpkgRun siteDrop pkgs in packages folderRefresh browserFeed toevoegen in VS & show pkgs
  • Xavier
  • Maarten
  • MaartenInloggen en feed aanmakenPackage pushen vanuit NPEFeed toevoegen aan VSOp MyGet feed security instellenPackage installen in VS en tonen dat er basic auth bijkomtPackage vanNuGet toevoegen op MyGet en tonen dat je alle dependencies kan meepakken, mirroring, … en dat je ook gewoon van uw packages.config kan toevoegen
  • Xavier
  • Xavier
  • Xavier
  • Maarten
  • Maarten
  • Xavier- Het feit dat geen garanties biedt op content- Wat als mensen packages verwijderen? BUILD breaks, DEVS unhappy again
  • Maarten -> Xavier
  • Xavier
  • Xavier
  • Xavier
  • Maarten
  • Maarten
  • TODO Scaffolding? Toevoegen van functies?Eventueel de NuGet.exe plugins ook nog tonen?
  • Maarten
  • Maarten
  • Xavier
  • Xavier
  • Maarten
  • XavierMaartenXavierMaarten
  • Transcript

    • 1. Organize your chickens
      NuGet for the Enterprise
    • 2. Who are we?
      Maarten Balliauw
      Antwerp, Belgium
      Focus on web
      ASP.NET, ASP.NET MVC, PHP, Azure, …
      MVP Windows Azure (formerly ASP.NET)
    • 3. Who are we?
      Xavier Decoster
      Antwerp, Belgium
      Focus on web/ALM
      Visual Studio, TFS, Scrum, ...
      Silverlight, ASP.NET, ASP.NET MVC, …
    • 4. Agenda
      Host your own NuGet repository
      Continuous (Package) Integration
    • 5. Welcome to Dll Hell
      Dependency Hell
    • 6. WelcometoDependency Hell
      “A term for the frustrationof software users who have installedsoftware packageswhich have dependencieson specificversionsof other software packages.”
      Source: Wikipedia
    • 7. Causeand Effect
      Reinventing the wheel
      We don’tneedthatdependency
      “If they can do it, we can do it, but better”
      Marketing does the versioning
      People are waitingfor v2 tobuy
      Let’s call it v4 Platform Update SP3 November Edition KB2348063 RTW Refresh
       Whathappenedtoreuse of components?
       We lost ownership of AssemblyVersion ?
    • 8. Package Management
      Using NuGet
    • 9. Package Management
      NuGet to the Rescue!
      “NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.”
    • 10. Package What?
      Package Management
      Simple concept
      Find Packages
      (Re)Use Packages
      Produce Packages
      “…a collection of software tools to automate the process of installing, upgrading, configuring, and removingsoftware packages…”
    • 11. GettingStarted
      NuGet Package Manager (
      NuGet Package Explorer (
      Install-Package NuGetPowerTools
      Install-Package NuGet.CommandLine
    • 12. Consuming Packages
      Simple as adding a reference
    • 13. Onedialogtorulethemall…
      Package Sources
      Local (offline) Cache location
      Also: Manage packages on solution level!
      Right-click solution > Manage NuGet Packages…
    • 14. NuGet Package Manager Console
      Scaffolding, NuGetPowerTools, …
    • 15. Configurable Package Sources
      NuGet Library Package Manager (VS add-in)
      NuGet.config (in %APPDATA%RoamingNuGetNuGet.config)
      NuGet.settings.targets (MSBUILD file part of NuGetPowerTools)
    • 16. Creating Packages
      What’s a package?
      Just a zip-filecontaining:
      … content and source code (tobeinjectedinto target project)
      … PowerShell scripts andexecutables
      … configuration file and source code transformations
    • 17. Package Conventions
      Folder structure
      Tools (init.ps1, install.ps1, uninstall.ps1)
      Manifest (.nuspec file)
    • 18. NuGet Manifest Specification
      NuSpec manifest
      XML file (with XSD available)
      Package metadata
    • 19. Semantic Versioning
      Think about your versioning! (
      Always specifylowerbound
      Use a version range (lowerbound + upperbound) whenversioning of package youdepend on is messed up
    • 20. Advanced usage scenarios
      Host your own NuGet repository
      Continuous (Package) Integration
      (Ab)using NuGet
    • 21. Hosting your own repository
      Those chickens are mine!
    • 22. Hosting your own repository
      NuGet = public feed
      Intellectual property
      NuGet maintained by package authors
      Author removes v1.0.45 and you depend on it
    • 23. Solutions
      Folder / File share
      Orchard Gallery (or NuGet Gallery)
      NuGet.Server package
    • 24. NuGet.Server Demo
      Install-Package NuGet.Server
    • 25. NuGet.Serverlimitations
      Only 1 feed per installation
      No UI: up toyoutobuildit
      No granular security: only 1 API-keyforentire feed
      Conclusion: requiresyoutodevelopifyou want something more useful
    • 26. Meet MyGet
      Register and off you go! (no dev)
      Supports Enterprise scenarios
      Granular security
      Package mirroring
    • 27. MyGet Demo
      Log in to and get started
    • 28. Continuous (Package) Integration
      Fetch the chickens when you need them
    • 29. Typical source control...
      Contains /References (if you are lucky)
      ...and also Project/_bin_deployable_assemblies
      ...and also /References/old
      ...and also /..././../.././References
      Usually references GAC-ed assemblies
    • 30. Dependencies
      Software has dependencies. Deal with it.
      But are those YOUR intellectual property?
      YOUR reason to build software?
      YOUR product?
      No. They are dependencies. And they don’t belong in source control.
    • 31. Continuous (Package) Integration
      Can I get rid of all these referencedassembliesduplicatedall-over my source control system?
      • Yes!
      Do I needtoinstallandmaintainNuGet on allmybuildagents?
      • No!
    • NuGetPowerTools Demo
      Organize your build chickens!
    • 32. 3rd partiesdon’tbelong in your SCM
      Source control bloatedwiththird-party binaries?
      Replacethem with NuGet packages
      Commitpackages.config/repositories.config files
      Preferablynot the packages
      Use NuGetPowerTools
    • 33. Problem!
      NuGet feed is subject to change...
      PackageSourceMSBuild property to the rescue
      NuGet.settings.targets in $(SolutionDir).nuget folder
      Host yourown feed andmirrorthird-party packages
      Network Share
      Or useMyGetforthat
    • 34. Organizeyourchickens
      Feed structuring
      Scopedbyquality: Build, QA, Production, …
      Scopedbyaudience: public, restricted access
      Scopedby product version, milestone…
      Scopedby target platform
    • 35. (Ab)using NuGet
    • 36. Guidance
      Publishing a package bringsgreatresponsibility
      Breakingchanges in your packages shouldbeversionedaccordingly!
      Consumersmightchooseto no longerconsumeany packages youpublished
    • 37. Guidance
      Package Integration ≠ Integration Testing
      CI buildsreflect output of source control input
      Same input alwaysproducessame output
      Do not auto-update packages duringautomatedbuilds!
    • 38.
    • 39. (Ab)using NuGet?
      Change of perspective
      NuGet as a package manager
      NuGet as a protocol for distributing packages
    • 40. ExtendingNuGet
      Scaffolding, CmdLets, Plug-ins, …
    • 41. Scaffolding
      T4, Mvc, …
      Automate Visual Studio (access to DTE)
    • 42. Automate deployments
      Build results in .nupkg
      Octopus deploys to its tentacles
      Test tentacles
      Staging tentacles
      Production tentacles
    • 43.
    • 44. NuGet command line plug-ins
      Extend NuGet.exe
      Custom Commands
      Build class library
      Reference NuGet.exe
      Inherit Command
      Deploy your dll to %LocalAppData%NuGetCommands
    • 45. Chocolatey
      developer library packages
      applications and tools packager
      “yum” or “apt-get” for Windows
    • 46. Chocolatey Demo
      NuGet desert
    • 47. Orchard / WebMatrix / …
      NuGetnotboundto VS
      Orchard CMS: modules & themes
      WebMatrix: install page helpers on the fly
      Yourapp: offer pluginsthrough a repo
    • 48. Conclusion
    • 49. Dependencies & people are chickens
      • Deal with them! NuGet can help
      Set up your own NuGet repository for various reasons
      Continuous package integration
      NuGet is a package manager
      • NuGet is a protocol
    • 50. Thank you!
      Any questions?