SlideShare a Scribd company logo
Nuget is easier than you thinkNuget is easier than you think
andand
you should be using it.you should be using it.
By
Justin James
About MeAbout Me
My name is Justin James. I'm a software craftsman building applications
in ASP.NET and C# at Intel. I have been using .NET since the 1.0 beta days.
You can find all of my presentations at
http://www.slides.com/digitaldrummerj
Code Demos
github.com/digitaldrummerj/NugetTalk
Follow me on twitter
@digitaldrummerj
TopicsTopics
Nuget Feature Overview
Consuming Packages
Creating Packages
Advanced Creating Packages
Hosting your own package feed
Other Projects using Nuget
More Information
Quick SurveyQuick Survey
How many of you have consumed a nuget package?
How many of you have created your own nuget packages?
How many have hosted your own nuget package feed?
What is the heck Nuget?What is the heck Nuget?
Package Manager for .NET
Way to easily share libraries, code, configurations
GUI is integrated into Visual Studio
or
Available as command line
Package format is a nupkg file
Similar to npm or bower in the node/angular world.
Note: Powershell 2.0 is required.
Where can I get nuget packages?Where can I get nuget packages?
Public Gallery: http://www.nuget.org/packages
Public Feed: https://www.nuget.org/api/v2/
A package source can be any URL or folder path
You can have multiple sources configured
What happens when I consume aWhat happens when I consume a
package?package?
1. Looks at package dependencies to figure out what is installed
2. Downloads any missing dependencies and installs them
3. Downloads package and installs it
4. package.config file created in project folder
5. repositories.config file is created in the packages folder
Note: The packages are store in a packages folder within the same
directory as the <Your Solution>.sln
What does install a package mean?What does install a package mean?
1. If package is used before then Uninstall.ps1 is run
2. References, Source Files, and Config changes are removed
3. A folder for each package is created in the package folder
4. Package is uncompressed
5. Any dll in the lib folder is added as a reference
6. Anything in the content folder are copied into the project
7. Files with a .pp extensions are transformed into source files
8. Xml files with a .transform extension are merged
9. Xml files with a (un)install.xdt are transformed
10. Init.ps1 is run
11. Install.ps1 is run
Note: Powershell scripts are optional
What happens when I build aWhat happens when I build a
solution?solution?
From within visual studio
Missing packages will automatically be downloaded before the 1st project
is built
Using MSBuild:
run nuget.exe restore in the sln directory to download missing packages
Note: This feature is called package restore
DemoDemo
UI Overview
Nuget Commands Overview
Consuming Packages
Package Restore
Creating Packages TopicsCreating Packages Topics
Basic Package Creation
Supporting Multiple Frameworks
Update Configuration Files
Include Source Code
Install/Uninstall Scripts
Creating Packages OverviewCreating Packages Overview
Can create from a project, assembly or directory
May contain:
assemblies, source code, powershell scripts, executables, config files,
config/source transformations
Most packages are project level
but you can create solution level packages.
Can support multiple .NET framework Versions and Profiles
If publishing package publicly, need a free account at http://nuget.org/
Solution level PackagesSolution level Packages
Installs a tool or additional commands for the Package Manager console
Does not add references, content, or build customizations to any projects
in your solution.
A package is considered a solution-level package if it and it dependencies
do not contain any files in its lib, content, or build directories.
Tracked in a packages.config file in the .nuget directory, rather than in a
packages.config file in a specific project.
Example: psake package
Package ConventionsPackage Conventions
Nuget uses convention over configuration approach
In general, have one package per assembly.
Package ID and Version are the identifiers used in the package feed
Version is normally the version number of the assembly
Standard Directories:
Tools - powershell scripts and programs accessible from PM
lib - Assemblies are added as references during install
content - files to copy to root of your project during install
build - MSBuild targets that are inserted into project file
Supporting Multiple FrameworksSupporting Multiple Frameworks
supports multiple frameworks in same package
can target any .NET profiles (client, full, compact)
Framework name is case sensitive
naming convention is
[lib/content/tools]{framework}{version}
Examples :
libnet20 to support .NET 2.0
libnet40-client to support .NET 4.0 client profile
Note: empty folder indicates don't do anything for that version
Basic Package CreationBasic Package Creation
Download nuget command line
Put nuget.exe into your path
Generate from assembly
nuget spec MyAssembly.dll
nuget pack MyAssembly.nuspec
Generate from project file
nuget spec -> from the project file dir
nuget pack MyProject.csproj
Generate from convention based directory
nuget spec package.id
nuget pack package.id.nuspec
Example Nuget Spec Non-VSExample Nuget Spec Non-VS
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>log4net.blank.config</id>
<version>1.0.0</version>
<title>Log4Net Blank Configuration File</title>
<authors>Justin James</authors>
<owners>Justin James</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Inserts a blank log4net.config file.</description>
<summary>Log4Net Blank Configuration File</summary>
<releaseNotes>Initial Rev</releaseNotes>
<dependencies>
<dependency id="log4net" version="2.0.3" />
</dependencies>
</metadata>
<files>
<file src="**" exclude="build.cmd" />
</files>
</package>
Example Nuget Spec - VSExample Nuget Spec - VS
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes> Summary of changes made in this release.</releaseNotes>
<copyright>Copyright 2014</copyright>
<tags>Demo</tags>
</metadata>
</package>
Common Nuget Pack OptionsCommon Nuget Pack Options
Against Visual Studio Project:
-IncludeReferencedProjects
-Prop Configuration=Release
-Build
-OutputDirectory control where the nupkg is saved to.
Using a GUI to create packagesUsing a GUI to create packages
Not everyone wants to use the command line to create package.
The is the GUI use for package creation.Nuget Package Explorer
Install using Chocolatey or http://npe.codeplex.com/
Questions on Creation Basics?Questions on Creation Basics?
Coming Up:
Updating Configuration Files
Including Source Code
Powershell Scripts
2 ways to update configs files2 ways to update configs files
Include a [filename].transform is xml based like a config file
or
Utilize XDT Transforms with
[filename].install.xdt
[filename].uninstall.xdt
[Filename].transform[Filename].transform
- contains XML that looks like config
- contains only sections to be merged.
- only adds elements or adds attributes
- does not change existing elements or attributes
- merged elements/attributes are removed on uninstall
[Filename].*.xdt[Filename].*.xdt
- utilizes the XDT syntax
same syntax as web.config.debug/release
- Allows manipulating of the structure instead of just merge
- xdt:Locator element that you want to change
- xdt:Transform what to do to the elements
- Insert, InsertIfMissing, InsertAfter, InsertBefore, SetAttributes
- Remove, RemoveAll, RemoveAttributes
http://msdn.microsoft.com/en-us/library/dd465326.aspx
Transform Source CodeTransform Source Code
[filename].cs.pp
- works somewhat like project templates
- any project property may be replace in .pp file
- property name surrounded by $
example: $rootnamespace$
http://msdn.microsoft.com/en-
us/library/vslangproj.projectproperties_properties(VS.80).aspx
Powershell ScriptsPowershell Scripts
Files should be located in the tools directory
Init.ps1
- run the 1st time package is installed into solution
- runs every time solution is opened in Visual Studio
- has to be in root of tools folder else will be ignored
Install.ps1
- run each time package is installed into a project
- must have files in content or lib folders to run
- runs after Init.ps1
Uninstall.ps1
- run each time package is uninstalled or updated
Powershell Scripts Cont.Powershell Scripts Cont.
Add this line at top of each file:
param($installPath, $toolsPath, $package, $project)
$installPath - path to the folder where package is installed
$toolsPath - path to tools directory
$package - reference to the package object
$project - reference to EnvDTE project object and null in Init.ps1
Helper Package to see values: NuGetPsVariables
- writes above values to log file and then uninstall itself
DemoDemo
Creating a nuget package from the command line.
Creating same package using Gui instead.
Config / Source Transforms
Install / Uninstall Powershell Scripts
Testing XDT Transforms
Script to Increment Package Version
NuGetPsVariables
Hosting Your Own Nuget FeedHosting Your Own Nuget Feed
Local Feed: point at a folder on your system
Remote Feeds: You can host a remote feed on a server that runs IIS.
Can also host nuget gallery locally
Setting up a Local Gallery
Branding the Nuget Gallery
Tell Everyone about the FeedTell Everyone about the Feed
Create a Nuget.Config file
Defines nuget configuration includes sources.
Loads from the default location
then loads any file named NuGet.config starting
from the root of the current drive
and ending in the current directory.
Default Location: %AppData%NugetNuget.Config
Docs: docs.nuget.org/docs/reference/nuget-config-file
DemoDemo
Creating Remote Feed
Adding new package source
Nuget.config overview
Updating nugetUpdating nuget
Visual Studio Tools -> Extensions and Updates
Command Line -> nuget update -self
Nuget vNext (aka 3.0)Nuget vNext (aka 3.0)
Totally redesigned UI
Consolidated installed/online/updates views together
Version selection for installs/updates within UI
WhatIf available in the UI
Control over dependency version selection
Open for multiple projects at once
Ability to leave UI open
http://blog.nuget.org/20141014/in-the-platform.html
Now available in Visual Studio 2015
Other projects using nugetOther projects using nuget
Chocolatey - windows package manager
BoxStarter - uses chocolatey. better way to setup new machine
Resharper Extension Manager - uses custom NuGet Gallery
JetBrains TeamCity - consume, create, publish tasks
MyGet - NuGet server to create/host you own feeds.
OctopusDeploy - convention-based automated deployment
SymbolSource - debug packages by downloading symbols/source
More InformationMore Information
Main NuGet Web Site and Package Repository
http://nuget.org/
Documentation
http://docs.nuget.org/
NuGet Team Blog
http://blog.nuget.org/
Apps Built On Top of Nuget
http://docs.nuget.org/docs/reference/ecosystem
Twitter Feed of Latest Packages
https://twitter.com/NuGetLatest
BooksBooks
Pro NuGet ( )Amazon Link
Nuget 2 Essentials ( )Amazon Link
Questions?Questions?
Blog: digitaldrummerj.azurewebsites.net
Email: digitaldrummerj at gmail.com
Twitter: @digitaldrummerj
Slides: http://www.slides.com/digitaldrummerj
BackupBackup
What does a nupkg do?What does a nupkg do?
Includes everything necessary to install a library or tool
Installs package dependencies
Can copy files to your solution
Can add references
Can update app.config / web.config
Can run powershell scripts
On uninstall, removes files, and reverses changes made in the project
3 ways to play with packages3 ways to play with packages
For Whole Solution:
Tools -> Nuget Package Manager -> Manage Nuget Packages for Solution
For Project:
In Solution Explorer -> Right-click on project -> select Manage Nuget
Packages
Powershell Based
Tools -> Nuget Package Manager -> Package Manager Console
Spec Replacement TokensSpec Replacement Tokens
$id$ -The Assembly Name
$version$ - version specified in the AssemblyVersion attribute
$author$ - company in the AssemblyCompany attribute
$description$ - description in the AssemblyDescription attribute
$configuration$ - build configuration (debug/release)
Getting HelpGetting Help
All of nuget's documentation: http://docs.nuget.org/
Package Manager Command Help
get-help nuget -> gets available nuget commands
get-help [nuget command] -> get specific command help
common help parameters:
-examples
-detailed
-full
-online
Installing PackagesInstalling Packages
In Solution Explorer:
Right click on project or solution
Select Manage Nuget Packages
Select Online-> All or specific source
Select for the package you want
Click Install (Always installs latest version)
In Package Manager Console:
Install-Package [Package Name]
Install-Package [Package Name] -Version [Version #]
Common CommandsCommon Commands
Manage Nuget Packages for Solution
List / Search
Install
Update
Uninstall
PM Console Commands
Install-Package
Update-Package
Uninstall-Package
Get-Package
Updating PackagesUpdating Packages
In Solution Explorer:
Right click on project or solution
Select Manage Nuget Packages
Select Updates -> All or specific source
In Package Manager Console:
Update-Package [Package Name] -> Specific Package
Update-Package -> All packages
Warning: Update-Package with no parameters will update each package
to latest version regardless of dependency version.
Warning #2: Update uninstalls previous version before install
Uninstall PackageUninstall Package
In Solution Explorer:
Right click on project or solution
Select Manage Nuget Packages
Select Installed Packages
Select Package to Uninstall
Click Uninstall
In Package Manager Console:
Uninstall-Package [Package Name]
Note: You can not delete packages that are a dependency to another
package
Re-Install PackagesRe-Install Packages
Best accomplished in the package manager console
In Manage Nuget Packages:
Would have to uninstall package and then go install package
In Package Manager Console:
The -Reinstall switch will uninstall and install package(s) including
dependencies.
Update-Package [Package Name] -Reinstall -> Specific Package
Update-Package -Reinstall -> All packages
Framework and ProfilesFramework and Profiles
Framework:
.NET Framework -> net
Silverlight -> sl
.NET Micro Framework -> netmf
Windows Phone 8 -> windowsphone8
Profiles:
Client -> client
Windows Phone 7 -> wp
Compact Framework -> cf
Full -> full
Framework Versions ExamplesFramework Versions Examples
.NET 3.5 -> net35
.NET 4.0 -> net40
.NET 3.5 Client - net35-client
.NET 4.0 Full -> net40-full
Silverlight 3 -> sl3
windows phone 8 -> windowsphone8
Portable Class Library for Windows Store App & .NET 4.5 -> portable-
windows8+net45
Full Docs
Useful PM Console SwitchesUseful PM Console Switches
-ProjectName -> specific projects to take action on
-Version -> version of package to use. default latest
-WhatIf -> displays the actions that would be taken
-Source -> specifics url or directory path to use
Publishing PackagesPublishing Packages
nuget setapikey [Api Key]
nuget push <package path> [API Key] [options]
Options:
-Source
-ApiKey
-Timeout
Default source is nuget.org unless specified or DefaultPushSource in
NuGet config file is set (%AppData%NugetNuget.config)
Hosting Remote Feed in AzureHosting Remote Feed in Azure
http://suchan.cz/2014/10/how-to-deploy-your-own-nuget-server-on-
azure-website-in-15-minutes/
or
http://bit.ly/11K6vMG
Include/Exclude FilesInclude/Exclude Files
<files>
<file src="" target="" exclude="" />
</files>
src -> location of files.
* wildcard is allowed.
** wildcard recursive directory search.
target -> relative path to put files into
exclude -> file(s) to exclude.
can contain semi-colon delimited list or file pattern
can use * and ** wildcards
DependenciesDependencies
<dependencies>
<dependency id="" version="" />
</dependencies>
id -> package id
version -> package version
Can be grouped by Framework by putting in
<group targetFramework=""></group>
if framework blank, acts as like the flat file list
Note: can either be grouped or flat but not mixed.
Assembly ReferencesAssembly References
<references>
<reference file="xunit.dll" />
</references>
Assemblies in the lib directory to add to the project reference list.
works just like dependencies with either flat list or grouped.
Can be grouped by Framework by putting in
<group targetFramework=""></group>
if framework blank, acts as like the flat file list
Note: can either be grouped or flat but not mixed.
Framework Assembly ReferencesFramework Assembly References
You can also reference Framework assemblies that are installed in the
GAC
<frameworkAssemblies>
<frameworkAssembly assemblyName="System.ServiceModel"
targetFramework="net40" />
<frameworkAssembly assemblyName="System.SomethingElse" />
</frameworkAssemblies>
Can specify multiple frameworks by separating by comma
if left blank, always add
UI PreviewUI Preview

More Related Content

What's hot

Puppet DSL: back to the basics
Puppet DSL: back to the basicsPuppet DSL: back to the basics
Puppet DSL: back to the basics
Julien Pivotto
 
Labri 2021-invited-talk
Labri 2021-invited-talkLabri 2021-invited-talk
Labri 2021-invited-talk
vschiavoni
 
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
Puppet
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020
Puppet
 
JupyterHub tutorial at JupyterCon
JupyterHub tutorial at JupyterConJupyterHub tutorial at JupyterCon
JupyterHub tutorial at JupyterCon
Carol Willing
 
Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
Puppet
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020
Puppet
 
Devops interview questions 1 www.bigclasses.com
Devops interview questions  1  www.bigclasses.comDevops interview questions  1  www.bigclasses.com
Devops interview questions 1 www.bigclasses.com
bigclasses.com
 
Devops interview questions 2 www.bigclasses.com
Devops interview questions  2  www.bigclasses.comDevops interview questions  2  www.bigclasses.com
Devops interview questions 2 www.bigclasses.com
bigclasses.com
 
Story of Puppet @eBay Global Classifieds Group (eCG)
Story of Puppet @eBay Global Classifieds Group (eCG)Story of Puppet @eBay Global Classifieds Group (eCG)
Story of Puppet @eBay Global Classifieds Group (eCG)
Puppet
 
DevTools Package Development
 DevTools Package Development DevTools Package Development
DevTools Package Development
Sagar Deogirkar
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
Puppet
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Puppet
 
E D - Environmental Dependencies in Python
E D - Environmental Dependencies in PythonE D - Environmental Dependencies in Python
E D - Environmental Dependencies in Python
Adam Englander
 
Wrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from PuppetWrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from Puppet
Puppet
 
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
garrett honeycutt
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
Sebastian Mauer
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
Kenu, GwangNam Heo
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
Puppet
 

What's hot (20)

Puppet DSL: back to the basics
Puppet DSL: back to the basicsPuppet DSL: back to the basics
Puppet DSL: back to the basics
 
Labri 2021-invited-talk
Labri 2021-invited-talkLabri 2021-invited-talk
Labri 2021-invited-talk
 
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020
 
JupyterHub tutorial at JupyterCon
JupyterHub tutorial at JupyterConJupyterHub tutorial at JupyterCon
JupyterHub tutorial at JupyterCon
 
Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020
 
Devops interview questions 1 www.bigclasses.com
Devops interview questions  1  www.bigclasses.comDevops interview questions  1  www.bigclasses.com
Devops interview questions 1 www.bigclasses.com
 
Devops interview questions 2 www.bigclasses.com
Devops interview questions  2  www.bigclasses.comDevops interview questions  2  www.bigclasses.com
Devops interview questions 2 www.bigclasses.com
 
Story of Puppet @eBay Global Classifieds Group (eCG)
Story of Puppet @eBay Global Classifieds Group (eCG)Story of Puppet @eBay Global Classifieds Group (eCG)
Story of Puppet @eBay Global Classifieds Group (eCG)
 
DevTools Package Development
 DevTools Package Development DevTools Package Development
DevTools Package Development
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
 
E D - Environmental Dependencies in Python
E D - Environmental Dependencies in PythonE D - Environmental Dependencies in Python
E D - Environmental Dependencies in Python
 
Wrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from PuppetWrangling 3rd Party Installers from Puppet
Wrangling 3rd Party Installers from Puppet
 
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
 
Apache ant
Apache antApache ant
Apache ant
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
 

Viewers also liked

Unit testing with NUnit
Unit testing with NUnitUnit testing with NUnit
Unit testing with NUnit
kleinron
 
Using nu get the way you should svcc
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svcc
Maarten Balliauw
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
Prashant Cholachagudd
 
Continuous integration with teamcity
Continuous integration with teamcityContinuous integration with teamcity
Continuous integration with teamcityEugene Sheretov
 
NUnit Features Presentation
NUnit Features PresentationNUnit Features Presentation
NUnit Features Presentation
Shir Brass
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock Tutorial
Sbin m
 
An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
weili_at_slideshare
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
Steven Smith
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
Pascal Laurin
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
ivpol
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCKhaled Musaied
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
Electronic Arts / DICE
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Svetlin Nakov
 

Viewers also liked (18)

Unit testing with NUnit
Unit testing with NUnitUnit testing with NUnit
Unit testing with NUnit
 
Using nu get the way you should svcc
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svcc
 
Nunit
NunitNunit
Nunit
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
 
N Unit Presentation
N Unit PresentationN Unit Presentation
N Unit Presentation
 
Continuous integration with teamcity
Continuous integration with teamcityContinuous integration with teamcity
Continuous integration with teamcity
 
NUnit Features Presentation
NUnit Features PresentationNUnit Features Presentation
NUnit Features Presentation
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock Tutorial
 
An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
 
Types of pattern
Types of patternTypes of pattern
Types of pattern
 
Domain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVCDomain-Driven Design with ASP.NET MVC
Domain-Driven Design with ASP.NET MVC
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
 

Similar to Nuget is easier than you think and you should be using it as both a consumer and creator of packages

Introduction to package manager
Introduction to package managerIntroduction to package manager
Introduction to package manager
yashobantabai
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
İbrahim UÇAR
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterprise
Maarten Balliauw
 
Unlocked package
Unlocked packageUnlocked package
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
Knoldus Inc.
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
Javier de Pedro López
 
Hosting your own NuGet private repository
Hosting your own NuGet private repositoryHosting your own NuGet private repository
Hosting your own NuGet private repository
Yu GUAN
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
Maarten Balliauw
 
Debian Packaging tutorial
Debian Packaging tutorialDebian Packaging tutorial
Debian Packaging tutorial
nussbauml
 
Creating an nuget package for EPiServer
Creating an nuget package for EPiServerCreating an nuget package for EPiServer
Creating an nuget package for EPiServer
Paul Graham
 
ZopeSkel & Buildout packages
ZopeSkel & Buildout packagesZopeSkel & Buildout packages
ZopeSkel & Buildout packagesQuintagroup
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
Jacob Nelson
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packages
Jeremiah Foster
 
Node js Global Packages
Node js Global PackagesNode js Global Packages
Node js Global Packages
sanskriti agarwal
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
Quintagroup
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterprise
Maarten Balliauw
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
European Collaboration Summit
 
$ make install
$ make install$ make install
$ make install
Marios Isaakidis
 
CQ Maven Methods
CQ Maven MethodsCQ Maven Methods
CQ Maven Methods
connectwebex
 

Similar to Nuget is easier than you think and you should be using it as both a consumer and creator of packages (20)

Introduction to package manager
Introduction to package managerIntroduction to package manager
Introduction to package manager
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterprise
 
Unlocked package
Unlocked packageUnlocked package
Unlocked package
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
 
Hosting your own NuGet private repository
Hosting your own NuGet private repositoryHosting your own NuGet private repository
Hosting your own NuGet private repository
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
 
Debian Packaging tutorial
Debian Packaging tutorialDebian Packaging tutorial
Debian Packaging tutorial
 
Creating an nuget package for EPiServer
Creating an nuget package for EPiServerCreating an nuget package for EPiServer
Creating an nuget package for EPiServer
 
ZopeSkel & Buildout packages
ZopeSkel & Buildout packagesZopeSkel & Buildout packages
ZopeSkel & Buildout packages
 
Technology Radar Talks - NuGet
Technology Radar Talks - NuGetTechnology Radar Talks - NuGet
Technology Radar Talks - NuGet
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packages
 
Node js Global Packages
Node js Global PackagesNode js Global Packages
Node js Global Packages
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterprise
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
$ make install
$ make install$ make install
$ make install
 
CQ Maven Methods
CQ Maven MethodsCQ Maven Methods
CQ Maven Methods
 

More from Justin James

KCDC 2018 - Rapid API Development with Sails
KCDC 2018 - Rapid API Development with SailsKCDC 2018 - Rapid API Development with Sails
KCDC 2018 - Rapid API Development with Sails
Justin James
 
Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018
Justin James
 
StirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with SailsStirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with Sails
Justin James
 
Mobile Dev For Web Devs
Mobile Dev For Web DevsMobile Dev For Web Devs
Mobile Dev For Web Devs
Justin James
 
Angular Unit Testing from the Trenches
Angular Unit Testing from the TrenchesAngular Unit Testing from the Trenches
Angular Unit Testing from the Trenches
Justin James
 
Up and Running with Angular
Up and Running with AngularUp and Running with Angular
Up and Running with Angular
Justin James
 
Everyone is a Public Speaker
Everyone is a Public SpeakerEveryone is a Public Speaker
Everyone is a Public Speaker
Justin James
 
Visual Studio Tools for Apache Cordova (TACO) and Ionic
Visual Studio Tools for Apache Cordova (TACO) and IonicVisual Studio Tools for Apache Cordova (TACO) and Ionic
Visual Studio Tools for Apache Cordova (TACO) and Ionic
Justin James
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
Justin James
 
Chocolatey - making the process of installing software on windows easy as pie
Chocolatey - making the process of installing software on windows easy as pieChocolatey - making the process of installing software on windows easy as pie
Chocolatey - making the process of installing software on windows easy as pie
Justin James
 

More from Justin James (10)

KCDC 2018 - Rapid API Development with Sails
KCDC 2018 - Rapid API Development with SailsKCDC 2018 - Rapid API Development with Sails
KCDC 2018 - Rapid API Development with Sails
 
Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018Angular Unit Testing NDC Minn 2018
Angular Unit Testing NDC Minn 2018
 
StirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with SailsStirTrek 2018 - Rapid API Development with Sails
StirTrek 2018 - Rapid API Development with Sails
 
Mobile Dev For Web Devs
Mobile Dev For Web DevsMobile Dev For Web Devs
Mobile Dev For Web Devs
 
Angular Unit Testing from the Trenches
Angular Unit Testing from the TrenchesAngular Unit Testing from the Trenches
Angular Unit Testing from the Trenches
 
Up and Running with Angular
Up and Running with AngularUp and Running with Angular
Up and Running with Angular
 
Everyone is a Public Speaker
Everyone is a Public SpeakerEveryone is a Public Speaker
Everyone is a Public Speaker
 
Visual Studio Tools for Apache Cordova (TACO) and Ionic
Visual Studio Tools for Apache Cordova (TACO) and IonicVisual Studio Tools for Apache Cordova (TACO) and Ionic
Visual Studio Tools for Apache Cordova (TACO) and Ionic
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
 
Chocolatey - making the process of installing software on windows easy as pie
Chocolatey - making the process of installing software on windows easy as pieChocolatey - making the process of installing software on windows easy as pie
Chocolatey - making the process of installing software on windows easy as pie
 

Recently uploaded

BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Nuget is easier than you think and you should be using it as both a consumer and creator of packages

  • 1. Nuget is easier than you thinkNuget is easier than you think andand you should be using it.you should be using it. By Justin James
  • 2. About MeAbout Me My name is Justin James. I'm a software craftsman building applications in ASP.NET and C# at Intel. I have been using .NET since the 1.0 beta days. You can find all of my presentations at http://www.slides.com/digitaldrummerj Code Demos github.com/digitaldrummerj/NugetTalk Follow me on twitter @digitaldrummerj
  • 3. TopicsTopics Nuget Feature Overview Consuming Packages Creating Packages Advanced Creating Packages Hosting your own package feed Other Projects using Nuget More Information
  • 4. Quick SurveyQuick Survey How many of you have consumed a nuget package? How many of you have created your own nuget packages? How many have hosted your own nuget package feed?
  • 5. What is the heck Nuget?What is the heck Nuget? Package Manager for .NET Way to easily share libraries, code, configurations GUI is integrated into Visual Studio or Available as command line Package format is a nupkg file Similar to npm or bower in the node/angular world. Note: Powershell 2.0 is required.
  • 6. Where can I get nuget packages?Where can I get nuget packages? Public Gallery: http://www.nuget.org/packages Public Feed: https://www.nuget.org/api/v2/ A package source can be any URL or folder path You can have multiple sources configured
  • 7. What happens when I consume aWhat happens when I consume a package?package? 1. Looks at package dependencies to figure out what is installed 2. Downloads any missing dependencies and installs them 3. Downloads package and installs it 4. package.config file created in project folder 5. repositories.config file is created in the packages folder Note: The packages are store in a packages folder within the same directory as the <Your Solution>.sln
  • 8. What does install a package mean?What does install a package mean? 1. If package is used before then Uninstall.ps1 is run 2. References, Source Files, and Config changes are removed 3. A folder for each package is created in the package folder 4. Package is uncompressed 5. Any dll in the lib folder is added as a reference 6. Anything in the content folder are copied into the project 7. Files with a .pp extensions are transformed into source files 8. Xml files with a .transform extension are merged 9. Xml files with a (un)install.xdt are transformed 10. Init.ps1 is run 11. Install.ps1 is run Note: Powershell scripts are optional
  • 9. What happens when I build aWhat happens when I build a solution?solution? From within visual studio Missing packages will automatically be downloaded before the 1st project is built Using MSBuild: run nuget.exe restore in the sln directory to download missing packages Note: This feature is called package restore
  • 10. DemoDemo UI Overview Nuget Commands Overview Consuming Packages Package Restore
  • 11. Creating Packages TopicsCreating Packages Topics Basic Package Creation Supporting Multiple Frameworks Update Configuration Files Include Source Code Install/Uninstall Scripts
  • 12. Creating Packages OverviewCreating Packages Overview Can create from a project, assembly or directory May contain: assemblies, source code, powershell scripts, executables, config files, config/source transformations Most packages are project level but you can create solution level packages. Can support multiple .NET framework Versions and Profiles If publishing package publicly, need a free account at http://nuget.org/
  • 13. Solution level PackagesSolution level Packages Installs a tool or additional commands for the Package Manager console Does not add references, content, or build customizations to any projects in your solution. A package is considered a solution-level package if it and it dependencies do not contain any files in its lib, content, or build directories. Tracked in a packages.config file in the .nuget directory, rather than in a packages.config file in a specific project. Example: psake package
  • 14. Package ConventionsPackage Conventions Nuget uses convention over configuration approach In general, have one package per assembly. Package ID and Version are the identifiers used in the package feed Version is normally the version number of the assembly Standard Directories: Tools - powershell scripts and programs accessible from PM lib - Assemblies are added as references during install content - files to copy to root of your project during install build - MSBuild targets that are inserted into project file
  • 15. Supporting Multiple FrameworksSupporting Multiple Frameworks supports multiple frameworks in same package can target any .NET profiles (client, full, compact) Framework name is case sensitive naming convention is [lib/content/tools]{framework}{version} Examples : libnet20 to support .NET 2.0 libnet40-client to support .NET 4.0 client profile Note: empty folder indicates don't do anything for that version
  • 16. Basic Package CreationBasic Package Creation Download nuget command line Put nuget.exe into your path Generate from assembly nuget spec MyAssembly.dll nuget pack MyAssembly.nuspec Generate from project file nuget spec -> from the project file dir nuget pack MyProject.csproj Generate from convention based directory nuget spec package.id nuget pack package.id.nuspec
  • 17. Example Nuget Spec Non-VSExample Nuget Spec Non-VS <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> <metadata> <id>log4net.blank.config</id> <version>1.0.0</version> <title>Log4Net Blank Configuration File</title> <authors>Justin James</authors> <owners>Justin James</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>Inserts a blank log4net.config file.</description> <summary>Log4Net Blank Configuration File</summary> <releaseNotes>Initial Rev</releaseNotes> <dependencies> <dependency id="log4net" version="2.0.3" /> </dependencies> </metadata> <files> <file src="**" exclude="build.cmd" /> </files> </package>
  • 18. Example Nuget Spec - VSExample Nuget Spec - VS <?xml version="1.0"?> <package > <metadata> <id>$id$</id> <version>$version$</version> <title>$title$</title> <authors>$author$</authors> <owners>$author$</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>$description$</description> <releaseNotes> Summary of changes made in this release.</releaseNotes> <copyright>Copyright 2014</copyright> <tags>Demo</tags> </metadata> </package>
  • 19. Common Nuget Pack OptionsCommon Nuget Pack Options Against Visual Studio Project: -IncludeReferencedProjects -Prop Configuration=Release -Build -OutputDirectory control where the nupkg is saved to.
  • 20. Using a GUI to create packagesUsing a GUI to create packages Not everyone wants to use the command line to create package. The is the GUI use for package creation.Nuget Package Explorer Install using Chocolatey or http://npe.codeplex.com/
  • 21. Questions on Creation Basics?Questions on Creation Basics? Coming Up: Updating Configuration Files Including Source Code Powershell Scripts
  • 22. 2 ways to update configs files2 ways to update configs files Include a [filename].transform is xml based like a config file or Utilize XDT Transforms with [filename].install.xdt [filename].uninstall.xdt
  • 23. [Filename].transform[Filename].transform - contains XML that looks like config - contains only sections to be merged. - only adds elements or adds attributes - does not change existing elements or attributes - merged elements/attributes are removed on uninstall
  • 24. [Filename].*.xdt[Filename].*.xdt - utilizes the XDT syntax same syntax as web.config.debug/release - Allows manipulating of the structure instead of just merge - xdt:Locator element that you want to change - xdt:Transform what to do to the elements - Insert, InsertIfMissing, InsertAfter, InsertBefore, SetAttributes - Remove, RemoveAll, RemoveAttributes http://msdn.microsoft.com/en-us/library/dd465326.aspx
  • 25. Transform Source CodeTransform Source Code [filename].cs.pp - works somewhat like project templates - any project property may be replace in .pp file - property name surrounded by $ example: $rootnamespace$ http://msdn.microsoft.com/en- us/library/vslangproj.projectproperties_properties(VS.80).aspx
  • 26. Powershell ScriptsPowershell Scripts Files should be located in the tools directory Init.ps1 - run the 1st time package is installed into solution - runs every time solution is opened in Visual Studio - has to be in root of tools folder else will be ignored Install.ps1 - run each time package is installed into a project - must have files in content or lib folders to run - runs after Init.ps1 Uninstall.ps1 - run each time package is uninstalled or updated
  • 27. Powershell Scripts Cont.Powershell Scripts Cont. Add this line at top of each file: param($installPath, $toolsPath, $package, $project) $installPath - path to the folder where package is installed $toolsPath - path to tools directory $package - reference to the package object $project - reference to EnvDTE project object and null in Init.ps1 Helper Package to see values: NuGetPsVariables - writes above values to log file and then uninstall itself
  • 28. DemoDemo Creating a nuget package from the command line. Creating same package using Gui instead. Config / Source Transforms Install / Uninstall Powershell Scripts Testing XDT Transforms Script to Increment Package Version NuGetPsVariables
  • 29. Hosting Your Own Nuget FeedHosting Your Own Nuget Feed Local Feed: point at a folder on your system Remote Feeds: You can host a remote feed on a server that runs IIS. Can also host nuget gallery locally Setting up a Local Gallery Branding the Nuget Gallery
  • 30. Tell Everyone about the FeedTell Everyone about the Feed Create a Nuget.Config file Defines nuget configuration includes sources. Loads from the default location then loads any file named NuGet.config starting from the root of the current drive and ending in the current directory. Default Location: %AppData%NugetNuget.Config Docs: docs.nuget.org/docs/reference/nuget-config-file
  • 31. DemoDemo Creating Remote Feed Adding new package source Nuget.config overview
  • 32. Updating nugetUpdating nuget Visual Studio Tools -> Extensions and Updates Command Line -> nuget update -self
  • 33. Nuget vNext (aka 3.0)Nuget vNext (aka 3.0) Totally redesigned UI Consolidated installed/online/updates views together Version selection for installs/updates within UI WhatIf available in the UI Control over dependency version selection Open for multiple projects at once Ability to leave UI open http://blog.nuget.org/20141014/in-the-platform.html Now available in Visual Studio 2015
  • 34. Other projects using nugetOther projects using nuget Chocolatey - windows package manager BoxStarter - uses chocolatey. better way to setup new machine Resharper Extension Manager - uses custom NuGet Gallery JetBrains TeamCity - consume, create, publish tasks MyGet - NuGet server to create/host you own feeds. OctopusDeploy - convention-based automated deployment SymbolSource - debug packages by downloading symbols/source
  • 35. More InformationMore Information Main NuGet Web Site and Package Repository http://nuget.org/ Documentation http://docs.nuget.org/ NuGet Team Blog http://blog.nuget.org/ Apps Built On Top of Nuget http://docs.nuget.org/docs/reference/ecosystem Twitter Feed of Latest Packages https://twitter.com/NuGetLatest
  • 36. BooksBooks Pro NuGet ( )Amazon Link Nuget 2 Essentials ( )Amazon Link
  • 37. Questions?Questions? Blog: digitaldrummerj.azurewebsites.net Email: digitaldrummerj at gmail.com Twitter: @digitaldrummerj Slides: http://www.slides.com/digitaldrummerj
  • 39. What does a nupkg do?What does a nupkg do? Includes everything necessary to install a library or tool Installs package dependencies Can copy files to your solution Can add references Can update app.config / web.config Can run powershell scripts On uninstall, removes files, and reverses changes made in the project
  • 40. 3 ways to play with packages3 ways to play with packages For Whole Solution: Tools -> Nuget Package Manager -> Manage Nuget Packages for Solution For Project: In Solution Explorer -> Right-click on project -> select Manage Nuget Packages Powershell Based Tools -> Nuget Package Manager -> Package Manager Console
  • 41. Spec Replacement TokensSpec Replacement Tokens $id$ -The Assembly Name $version$ - version specified in the AssemblyVersion attribute $author$ - company in the AssemblyCompany attribute $description$ - description in the AssemblyDescription attribute $configuration$ - build configuration (debug/release)
  • 42. Getting HelpGetting Help All of nuget's documentation: http://docs.nuget.org/ Package Manager Command Help get-help nuget -> gets available nuget commands get-help [nuget command] -> get specific command help common help parameters: -examples -detailed -full -online
  • 43. Installing PackagesInstalling Packages In Solution Explorer: Right click on project or solution Select Manage Nuget Packages Select Online-> All or specific source Select for the package you want Click Install (Always installs latest version) In Package Manager Console: Install-Package [Package Name] Install-Package [Package Name] -Version [Version #]
  • 44. Common CommandsCommon Commands Manage Nuget Packages for Solution List / Search Install Update Uninstall PM Console Commands Install-Package Update-Package Uninstall-Package Get-Package
  • 45. Updating PackagesUpdating Packages In Solution Explorer: Right click on project or solution Select Manage Nuget Packages Select Updates -> All or specific source In Package Manager Console: Update-Package [Package Name] -> Specific Package Update-Package -> All packages Warning: Update-Package with no parameters will update each package to latest version regardless of dependency version. Warning #2: Update uninstalls previous version before install
  • 46. Uninstall PackageUninstall Package In Solution Explorer: Right click on project or solution Select Manage Nuget Packages Select Installed Packages Select Package to Uninstall Click Uninstall In Package Manager Console: Uninstall-Package [Package Name] Note: You can not delete packages that are a dependency to another package
  • 47. Re-Install PackagesRe-Install Packages Best accomplished in the package manager console In Manage Nuget Packages: Would have to uninstall package and then go install package In Package Manager Console: The -Reinstall switch will uninstall and install package(s) including dependencies. Update-Package [Package Name] -Reinstall -> Specific Package Update-Package -Reinstall -> All packages
  • 48. Framework and ProfilesFramework and Profiles Framework: .NET Framework -> net Silverlight -> sl .NET Micro Framework -> netmf Windows Phone 8 -> windowsphone8 Profiles: Client -> client Windows Phone 7 -> wp Compact Framework -> cf Full -> full
  • 49. Framework Versions ExamplesFramework Versions Examples .NET 3.5 -> net35 .NET 4.0 -> net40 .NET 3.5 Client - net35-client .NET 4.0 Full -> net40-full Silverlight 3 -> sl3 windows phone 8 -> windowsphone8 Portable Class Library for Windows Store App & .NET 4.5 -> portable- windows8+net45 Full Docs
  • 50. Useful PM Console SwitchesUseful PM Console Switches -ProjectName -> specific projects to take action on -Version -> version of package to use. default latest -WhatIf -> displays the actions that would be taken -Source -> specifics url or directory path to use
  • 51. Publishing PackagesPublishing Packages nuget setapikey [Api Key] nuget push <package path> [API Key] [options] Options: -Source -ApiKey -Timeout Default source is nuget.org unless specified or DefaultPushSource in NuGet config file is set (%AppData%NugetNuget.config)
  • 52. Hosting Remote Feed in AzureHosting Remote Feed in Azure http://suchan.cz/2014/10/how-to-deploy-your-own-nuget-server-on- azure-website-in-15-minutes/ or http://bit.ly/11K6vMG
  • 53. Include/Exclude FilesInclude/Exclude Files <files> <file src="" target="" exclude="" /> </files> src -> location of files. * wildcard is allowed. ** wildcard recursive directory search. target -> relative path to put files into exclude -> file(s) to exclude. can contain semi-colon delimited list or file pattern can use * and ** wildcards
  • 54. DependenciesDependencies <dependencies> <dependency id="" version="" /> </dependencies> id -> package id version -> package version Can be grouped by Framework by putting in <group targetFramework=""></group> if framework blank, acts as like the flat file list Note: can either be grouped or flat but not mixed.
  • 55. Assembly ReferencesAssembly References <references> <reference file="xunit.dll" /> </references> Assemblies in the lib directory to add to the project reference list. works just like dependencies with either flat list or grouped. Can be grouped by Framework by putting in <group targetFramework=""></group> if framework blank, acts as like the flat file list Note: can either be grouped or flat but not mixed.
  • 56. Framework Assembly ReferencesFramework Assembly References You can also reference Framework assemblies that are installed in the GAC <frameworkAssemblies> <frameworkAssembly assemblyName="System.ServiceModel" targetFramework="net40" /> <frameworkAssembly assemblyName="System.SomethingElse" /> </frameworkAssemblies> Can specify multiple frameworks by separating by comma if left blank, always add