Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Nuget

 Nuget

Nuget lightning talk - 2011

Rob Gibbens

April 21, 2012
Tweet

More Decks by Rob Gibbens

Other Decks in Programming

Transcript

  1. NUGET PACKAGE MANAGEMENT MADE EASY Saturday, April 21, 12 In

    September, Microsoft announced NuGet, a free, open source package management solution for .net. NuGet is Microsoft's first truly open source application. While other platforms, notably Ruby, have had package managers before, the concept is still relatively new in the .net space.
  2. WHAT IS PACKAGE MANAGEMENT? Saturday, April 21, 12 So, what

    is package management? Package Managers help with discovering, downloading, installing, configuring, and updating third-party libraries. These libraries can be either OSS, your company's, or your own. NuGet can be used from a command line, from a Powershell window inside of Visual Studio, or as simply as right clicking on a project in Visual Studio and choosing Add Package Reference. NuGet allows open source developers to package their libraries along with their dependencies, and add them to a central feed. NuGet handles dependency management between libraries (for example: Nhibernate requires Castle.Core, Castle.Windsor, etc;). It also makes it easy to update (and optionally remove) libraries from your projects later. Finally, it supports updating web.config files (if a package needs configuration settings).
  3. WHAT IS PACKAGE MANAGEMENT? Saturday, April 21, 12 So, what

    is package management? Package Managers help with discovering, downloading, installing, configuring, and updating third-party libraries. These libraries can be either OSS, your company's, or your own. NuGet can be used from a command line, from a Powershell window inside of Visual Studio, or as simply as right clicking on a project in Visual Studio and choosing Add Package Reference. NuGet allows open source developers to package their libraries along with their dependencies, and add them to a central feed. NuGet handles dependency management between libraries (for example: Nhibernate requires Castle.Core, Castle.Windsor, etc;). It also makes it easy to update (and optionally remove) libraries from your projects later. Finally, it supports updating web.config files (if a package needs configuration settings).
  4. WHAT IS PACKAGE MANAGEMENT? Saturday, April 21, 12 So, what

    is package management? Package Managers help with discovering, downloading, installing, configuring, and updating third-party libraries. These libraries can be either OSS, your company's, or your own. NuGet can be used from a command line, from a Powershell window inside of Visual Studio, or as simply as right clicking on a project in Visual Studio and choosing Add Package Reference. NuGet allows open source developers to package their libraries along with their dependencies, and add them to a central feed. NuGet handles dependency management between libraries (for example: Nhibernate requires Castle.Core, Castle.Windsor, etc;). It also makes it easy to update (and optionally remove) libraries from your projects later. Finally, it supports updating web.config files (if a package needs configuration settings).
  5. WHAT IS PACKAGE MANAGEMENT? Saturday, April 21, 12 So, what

    is package management? Package Managers help with discovering, downloading, installing, configuring, and updating third-party libraries. These libraries can be either OSS, your company's, or your own. NuGet can be used from a command line, from a Powershell window inside of Visual Studio, or as simply as right clicking on a project in Visual Studio and choosing Add Package Reference. NuGet allows open source developers to package their libraries along with their dependencies, and add them to a central feed. NuGet handles dependency management between libraries (for example: Nhibernate requires Castle.Core, Castle.Windsor, etc;). It also makes it easy to update (and optionally remove) libraries from your projects later. Finally, it supports updating web.config files (if a package needs configuration settings).
  6. WHAT IS PACKAGE MANAGEMENT? Saturday, April 21, 12 So, what

    is package management? Package Managers help with discovering, downloading, installing, configuring, and updating third-party libraries. These libraries can be either OSS, your company's, or your own. NuGet can be used from a command line, from a Powershell window inside of Visual Studio, or as simply as right clicking on a project in Visual Studio and choosing Add Package Reference. NuGet allows open source developers to package their libraries along with their dependencies, and add them to a central feed. NuGet handles dependency management between libraries (for example: Nhibernate requires Castle.Core, Castle.Windsor, etc;). It also makes it easy to update (and optionally remove) libraries from your projects later. Finally, it supports updating web.config files (if a package needs configuration settings).
  7. WHAT IS PACKAGE MANAGEMENT? Saturday, April 21, 12 So, what

    is package management? Package Managers help with discovering, downloading, installing, configuring, and updating third-party libraries. These libraries can be either OSS, your company's, or your own. NuGet can be used from a command line, from a Powershell window inside of Visual Studio, or as simply as right clicking on a project in Visual Studio and choosing Add Package Reference. NuGet allows open source developers to package their libraries along with their dependencies, and add them to a central feed. NuGet handles dependency management between libraries (for example: Nhibernate requires Castle.Core, Castle.Windsor, etc;). It also makes it easy to update (and optionally remove) libraries from your projects later. Finally, it supports updating web.config files (if a package needs configuration settings).
  8. HOW DO WE USE OSS NOW? Saturday, April 21, 12

    To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  9. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  10. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  11. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  12. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  13. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  14. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  15. HOW DO WE USE OSS NOW? 1. You first need

    to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file Saturday, April 21, 12 To really explain why we need package management, we can ask “How do I currently get OSS”? I’m going to use the canonical example that Scott Guthrie and Scott Hanselman used of EL-MAH (Error Logging Modules and Handlers). This makes a good example, since it includes not only referencing a dll but also updating the web.config file. 1. You first need to discover ELMAH somehow. 2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one. 3. After downloading the zip file, don’t forget to unblock it. 4. The package needs to be unzipped, typically into a lib folder within the solution. 5. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer. 6. Finally, you need to figure out the correct configuration settings and apply them to the web.config file After a while, it’s enough to make you go all Office Space on your computer. Demo
  16. HOW DO I GET IT? nuget.org Saturday, April 21, 12

    Available stand alone, as part of ASP.Net MVC 3, WebMatrix, or the Web Platform Installer and will be included in the next version of Visual Studio
  17. WHERE CAN I LEARN MORE? Blogs : Scott Guthrie Phil

    Haack David Ebbo Bil Simser Eric Hexter nuget.org Twitter @davidebbo @davidfowl @haacked @ehexter Saturday, April 21, 12