Free Sample
+ Collection

NuGet 2 Essentials

Damir Arh, Dejan Dakić

A clearly written guide for .NET developers who want to get to grips with the NuGet package manager. Filled with practical examples, it leads up to teaching you how to set up your own internal server.
RRP $17.99
RRP $29.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782165866
Paperback116 pages

About This Book

  • Easily find and refer third-party libraries from your projects
  • Create packages from your class libraries for others to use and publish them to the official NuGet gallery
  • Host your own internal NuGet server and publish packages to it

Who This Book Is For

If you are a .NET developer who wants to learn more about NuGet, this book is ideal for you. Although it doesn’t require any prior knowledge about NuGet itself, it assumes that you are already familiar with Visual Studio and the .NET framework. All code in the examples is written using C# so you will also need at least a basic knowledge of the language.

Table of Contents

Chapter 1: Using a Package Manager in Visual Studio
Benefits of using a package manager
Manually adding third-party library references
Setting up NuGet in Visual Studio
Adding references to third-party libraries using NuGet
Chapter 2: Package Management
Updating referenced third-party libraries
Support for different target platforms
Using NuGet with source control
Using Package Manager Console
Chapter 3: Creating and Publishing a Package
Creating a package with NuGet Package Explorer
Publishing the package to the official NuGet Gallery
Creating and publishing a package from the command line
Generating the package during the build process
Understanding package versioning
Chapter 4: Adding Features to a NuGet Package
Package folder structure
Multiplatform support
Packaging localized satellite assemblies
Adding new files and modifying existing ones
Including PowerShell scripts in a package
Debugging of packages
Chapter 5: Hosting an Internal NuGet Server
Understanding reasons for hosting NuGet internally
Creating a NuGet package repository
NuGet server in a continuous integration system

What You Will Learn

  • Install NuGet in all supported versions of Visual Studio
  • Use NuGet with source control and build servers
  • Create a NuGet package for your own class library
  • Publish your package to the official NuGet gallery
  • Create packages with multiplatform and multi-language support
  • Automatically configure target projects from the packages you create
  • Include custom install and uninstall scripts in your packages
  • Support debugging of your packaged libraries
  • Install your own internal NuGet server
  • Configure NuGet to use different NuGet servers

In Detail

NuGet has made the process of finding and referencing libraries from Visual Studio much easier and has strongly contributed to the expansion of an open source ecosystem. In the three years since its release, it has become an essential tool for both consuming and publishing class libraries for the .NET framework.

A concise and practical guide to everything that NuGet has to offer to both consumers and publishers. Through many hands on examples, NuGet2 Essentials will demonstrate all of NuGet’s features and teach you how to use them in everyday development in a .NET framework.

Starting out by using NuGet for consuming third-party libraries, this concise guide continues with a detailed look at creating your own packages, and ends by teaching you how to set up your own internal server. Through practical examples, you will learn to manage versions of installed libraries on all development and build machines. You will also discover how to create packages for your own libraries so they can be easily consumed, no matter how much configuration they require. By hosting an internal server, you will have full control of packages being used in your development environment.

By the end of the book, you will know about everything that NuGet has to offer, and how it can make your development process better.


Read More