NuGet Nuggets

1,517 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,517
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • http://www.flickr.com/photos/spyndle/2422552640/
  • NuGet Nuggets

    1. 1. ctrl f5<br />
    2. 2. Clark Sell<br />
    3. 3.
    4. 4. developer evangelist<br />
    5. 5. csell.net<br />
    6. 6.
    7. 7.
    8. 8. @csell5<br />
    9. 9. bitbucket.org/csell5/demos<br />
    10. 10.
    11. 11. hopefully<br />
    12. 12.
    13. 13. nuggets<br />
    14. 14. What is nuget?<br />NuGetis 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 OutercurveFoundation.<br />nuget.codeplex.com<br />
    15. 15.
    16. 16.
    17. 17.
    18. 18. 091998E7-A522-4DD0-86FF-8A0FDCAB3C0C<br />
    19. 19. NPack<br />
    20. 20.
    21. 21.
    22. 22. distribution methods<br />
    23. 23.
    24. 24.
    25. 25.
    26. 26. .exe, .msi, .zip <br />Installed to Operating System<br />Lots of choices<br />Usually chained with other packages<br />Stands and installs by itself<br />No native distribution channel<br />No free marketing<br />Manual Updates, ie need another package and user input<br />Examples packages:<br />WebPI<br />Visual Studio<br />Office<br />
    27. 27. WebPI<br />Catalogue of products<br />Install stands on it’s own<br />Packages install to operating system<br />Install through WebPI distribute channel<br />Installation Simplified<br />Drive by, Marketing<br />Example Packages:<br />WebPI<br />MVC<br />IIS Modules<br />WordPress<br />
    28. 28. VS extension manager<br />Part of Visual Studio<br />Packages install into Visual Studio<br />Packages are targeted to augmenting the development experience<br />Automatic updating<br />Drive by marketing<br />Example packages include<br />nuget<br />Visual Studio Powertools<br />JetBrainsResharper<br />
    29. 29. nuget<br />Packages are usually “libraries”<br />Packages are meant to be developed against <br />Multiple hosting strategies<br />Channel = Web<br />Drive by martketing<br />Easy tooling integration with things like Visual Studio, WebMatrix<br />Example packages:<br />ELMAH<br />Entity Framework<br />SQL Compact<br />UrlShortenerHelper<br />
    30. 30.
    31. 31. architecture breakdown<br />Command Line, Visual Studio, WebMatrix, Applications<br />nuget<br />Core, Dialog or Interface, Server<br />nupackpackages<br />GalleryServer<br />
    32. 32. package breakdown<br /><ul><li>Name
    33. 33. Version
    34. 34. content - These files will be copied to the site root on install
    35. 35. Readme.txt
    36. 36. web.config.transform
    37. 37. Lib - dlls under this folder become assembly references on install
    38. 38. MyCommonAssembly.dll { all framework versions }
    39. 39. Net35 { Frameowork Name }{ Version }
    40. 40. MyAssembly.dll
    41. 41. Net40
    42. 42. MyAssembly.dll
    43. 43. xxx.Nuspec</li></li></ul><li>.nuspec<br /><?xml version="1.0"?><br /><packagexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br />xmlns:xsd="http://www.w3.org/2001/XMLSchema"><br /> <metadataxmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"><br /> <id>UrlShortener.Helper</id><br /> <version>0.9.1</version><br /> <authors>Clark Sell</authors><br /> <licenseUrl>http://urlshortenerhelper.codeplex.com/license</licenseUrl><br /> <projectUrl>http://urlshortenerhelper.codeplex.com</projectUrl><br /> <requireLicenseAcceptance>false</requireLicenseAcceptance><br /> <language>en-US</language><br /> <description>desc</description><br /> <summary>summary</summary><br /> </metadata><br /></package><br />
    44. 44. .nuspec dependencies<br /><?xml version="1.0" encoding="utf-8"?><br /><package><br /> <metadata><br /> <id>sample</id><br /> <version>1.0.0</version><br /> <authors>Microsoft</authors><br /> <dependencies><br /> <dependencyid="another-package" version="3.0.0" /><br /> <dependencyid="yet-another-package" minversion="2.1.0" /><br /> </dependencies> <br /> </metadata><br /></package><br />
    45. 45. config transforms<br />contentweb.config.tranform ( or app.config )<br />It does a merge not a copy<br />Existing<br /><configuration><br /> <system.webServer><br /> <modules><br /> <add name="csellModule" type="csell.module" /><br /> </modules><br /> <system.webServer><br /></configuration><br />Transform<br /><…><br /> <add name="csellNewModule" type="csell.newModule" /><br /></…><br />Resulting<br /><…><br /> <add name="csellModule" type="csell.module" /><br /> <add name="csellNewModule" type="csell.newModule" /><br /></…><br />
    46. 46. source transforms<br />Oh yes you can….<br />Similar to Visual Studio Project Templates<br />David Ebbo, NuGets with Startup code and WebActivator<br />http://blogs.msdn.com/b/davidebb/archive/2010/10/11/light-up-your-nupacks-with-startup-code-and-webactivator.aspx<br />ProjectProperties Properties – <br />http://msdn.microsoft.com/en-us/library/vslangproj.projectproperties_properties(VS.80).aspx<br />
    47. 47. developers<br />Get<br />Push <br />Host<br />HOST<br />Get<br />Push<br />
    48. 48. demo<br />Installing<br />Browsing packages<br />Installing packages<br />Creating Packages<br />Creating<br />Dependencies<br />Transforms<br />Hosting Packages<br />
    49. 49. resources<br />nuget - nuget.codeplex.com<br />current nuget package store - nuPackPackages.codeplex.com<br />nuget gallery server - GalleryServer.codeplex.com<br />and more…<br />

    ×