Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Using NuGet libraries in your
application
Andrei Marukovich
LunarFrog.com
twitter: @amarukovich
What is NuGet?
• Package Gallery with 65,000+ unique packages
• Package manager with CLI and VS clients
• NuGet libraries
Usage of the NuGet libraries
• NuGet tool
• Chocolatey
• Squirrel
• Wyam
• Cake
• ReSharper
• LINQPad
• scriptcs
What we are going to discuss
• Package anatomy
• Package authoring
• Consuming packages using NuGet API
Package anatomy
• Package is a .zip archive with .nupkg extension
XYZ.nupkg
lib
net40
xyz.dll
uwp10.0
xyz.dll
netstandard1...
Package authoring
Usage scenarios for NuGet API
• Dynamically compose an application from NuGet packages
• Install/update an app plugin as a...
Demo workflow
• Prepare package sources
• NuGet.org, MyGet.net, local folder, etc.
• Identify a list of packages to instal...
Notes
• NuGet is composed from more than 30 libraries
• Demonstrated workflow uses 9 of this libraries
• Top level package...
NuGet API
Recap
• Defined package feed and available resources
• PackageSource and SourceRepository
• Defined required packages
• IP...
More information
• lunarfrog.com/blog
• docs.nuget.org
• APINuGet API V3
Thank you!
Andrei Marukovich
contact@lunarfrog.com
twitter: @amarukovich
Upcoming SlideShare
Loading in …5
×

Using NuGet libraries in your application

248 views

Published on

NuGet is not only a Visual Studio extension or a command line application. It is also a set of libraries which can be used to manipulate NuGet packages programmatically. Do you have a unique CI process, beyond the expected NuGet workflow? Do you need your own way to propagate dependencies between the subsystem? Or maybe you want to create a NuGet-based deployment process for the end users? During this session you will learn about the main NuGet library concepts, will see example of the embedded NuGet usage and will hear some guidance to help you with integrating NuGet with your own application.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Using NuGet libraries in your application

  1. 1. Using NuGet libraries in your application Andrei Marukovich LunarFrog.com twitter: @amarukovich
  2. 2. What is NuGet? • Package Gallery with 65,000+ unique packages • Package manager with CLI and VS clients • NuGet libraries
  3. 3. Usage of the NuGet libraries • NuGet tool • Chocolatey • Squirrel • Wyam • Cake • ReSharper • LINQPad • scriptcs
  4. 4. What we are going to discuss • Package anatomy • Package authoring • Consuming packages using NuGet API
  5. 5. Package anatomy • Package is a .zip archive with .nupkg extension XYZ.nupkg lib net40 xyz.dll uwp10.0 xyz.dll netstandard13 xyz.dll content tools xyz.nuspec
  6. 6. Package authoring
  7. 7. Usage scenarios for NuGet API • Dynamically compose an application from NuGet packages • Install/update an app plugin as a NuGet package
  8. 8. Demo workflow • Prepare package sources • NuGet.org, MyGet.net, local folder, etc. • Identify a list of packages to install • A list of top level packages, requested by user or application • Request NuGet to discover dependencies for the targeted packages • Install packages • Install target packages • Recursively install dependencies • Use packages
  9. 9. Notes • NuGet is composed from more than 30 libraries • Demonstrated workflow uses 9 of this libraries • Top level packages • NuGet.DependencyResolver • NuGet.Protocol.Core.v3 • Sample is based on NuGet 3.5.0-rc1-final • API may change before the release
  10. 10. NuGet API
  11. 11. Recap • Defined package feed and available resources • PackageSource and SourceRepository • Defined required packages • IProjectDependencyProvider and LibraryDependency • Discovered dependencies • RemoteDependencyWalker • Installed packages • PackageExtractor
  12. 12. More information • lunarfrog.com/blog • docs.nuget.org • APINuGet API V3
  13. 13. Thank you! Andrei Marukovich contact@lunarfrog.com twitter: @amarukovich

×