39
ctrl f5

NuGet Nuggets

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: NuGet Nuggets

ctrl f5

Page 2: NuGet Nuggets

Clark Sell

Page 3: NuGet Nuggets
Page 4: NuGet Nuggets

developer evangelist

Page 5: NuGet Nuggets

csell.net

Page 6: NuGet Nuggets
Page 7: NuGet Nuggets
Page 8: NuGet Nuggets

@csell5

Page 9: NuGet Nuggets

bitbucket.org/csell5/demos

Page 10: NuGet Nuggets
Page 11: NuGet Nuggets

hopefully

Page 12: NuGet Nuggets
Page 13: NuGet Nuggets

nuggets

Page 14: NuGet Nuggets

What is nuget?

NuGet is a free, open source developer focused package management system for the .NET platform intent on simplifying the

process of incorporating third party libraries into a .NET application during

development. NuGet is a member of the ASP.NET Gallery in the Outercurve

Foundation.

nuget.codeplex.com

Page 15: NuGet Nuggets
Page 16: NuGet Nuggets
Page 17: NuGet Nuggets
Page 18: NuGet Nuggets

091998E7-A522-4DD0-86FF-8A0FDCAB3C0C

Page 19: NuGet Nuggets

NPack

Page 20: NuGet Nuggets
Page 21: NuGet Nuggets
Page 22: NuGet Nuggets

distribution methods

WebPI

EXE or MSI

VS Ext Mgr

nuget

Page 23: NuGet Nuggets
Page 24: NuGet Nuggets
Page 25: NuGet Nuggets
Page 26: NuGet Nuggets

.exe, .msi, .zip

• Installed to Operating System

• Lots of choices

• Usually chained with other packages

• Stands and installs by itself

• No native distribution channel

• No free marketing

• Manual Updates, ie need another package and user input

• Examples packages:

• WebPI

• Visual Studio

• Office

Page 27: NuGet Nuggets

WebPI

• Catalogue of products

• Install stands on it’s own

• Packages install to operating system

• Install through WebPI distribute channel

• Installation Simplified

• Drive by, Marketing

• Example Packages:

• WebPI

• MVC

• IIS Modules

• WordPress

Page 28: NuGet Nuggets

VS extension manager

• Part of Visual Studio

• Packages install into Visual Studio

• Packages are targeted to augmenting the development experience

• Automatic updating

• Drive by marketing

• Example packages include

• nuget

• Visual Studio Powertools

• JetBrains Resharper

Page 29: NuGet Nuggets

nuget

• Packages are usually “libraries”

• Packages are meant to be developed against

• Multiple hosting strategies

• Channel = Web

• Drive by martketing

• Easy tooling integration with things like Visual Studio, WebMatrix

• Example packages:

• ELMAH

• Entity Framework

• SQL Compact

• UrlShortenerHelper

Page 30: NuGet Nuggets

OS

Developer

nuget

Elmah

EF

VS Extension Manger

ReSharper

nuget

WebPI

IIS Modules

Orchard

EXE or MSI

WebPI

Visual Studio

Page 31: NuGet Nuggets

architecture breakdown

nuget

Core, Dialog or Interface, Server

nupackpackages

GalleryServer

Command Line, Visual Studio, WebMatrix, Applications

Page 32: NuGet Nuggets

package breakdown \Name

\Version

\content - These files will be copied to the site root on install

\Readme.txt

web.config.transform

Lib - dlls under this folder become assembly references on install

\MyCommonAssembly.dll { all framework versions }

\Net35 { Frameowork Name }{ Version }

\MyAssembly.dll

\Net40

\MyAssembly.dll

\xxx.Nuspec

Page 33: NuGet Nuggets

.nuspec<?xml version="1.0"?>

<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">

<id>UrlShortener.Helper</id>

<version>0.9.1</version>

<authors>Clark Sell</authors>

<licenseUrl>http://urlshortenerhelper.codeplex.com/license</licenseUrl>

<projectUrl>http://urlshortenerhelper.codeplex.com</projectUrl>

<requireLicenseAcceptance>false</requireLicenseAcceptance>

<language>en-US</language>

<description>desc</description>

<summary>summary</summary>

</metadata>

</package>

Page 34: NuGet Nuggets

.nuspec dependencies<?xml version="1.0" encoding="utf-8"?>

<package>

<metadata>

<id>sample</id>

<version>1.0.0</version>

<authors>Microsoft</authors>

<dependencies>

<dependency id="another-package" version="3.0.0" />

<dependency id="yet-another-package" minversion="2.1.0" />

</dependencies>

</metadata>

</package>

Page 35: NuGet Nuggets

config transforms\content\web.config.tranform ( or app.config )

It does a merge not a copy

Existing<configuration>

<system.webServer>

<modules>

<add name="csellModule" type="csell.module" />

</modules>

<system.webServer>

</configuration>

Transform<…>

<add name="csellNewModule" type="csell.newModule" />

</…>

Resulting<…>

<add name="csellModule" type="csell.module" />

<add name="csellNewModule" type="csell.newModule" />

</…>

Page 37: NuGet Nuggets

developers

1. Get

2. Push

3. Host

HOST

Push

Get

Page 38: NuGet Nuggets

demo

• Installing

• Browsing packages

• Installing packages

• Creating Packages

• Creating

• Dependencies

• Transforms

• Hosting Packages

Page 39: NuGet Nuggets

resources• nuget - nuget.codeplex.com

• current nuget package store - nuPackPackages.codeplex.com

• nuget gallery server - GalleryServer.codeplex.com

• and more…