Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

2011 - Dotnet Information Day: NUGET

NUGET

Livres associés

Gratuit avec un essai de 30 jours de Scribd

Tout voir
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

2011 - Dotnet Information Day: NUGET

  1. 1. devcoach.com NuGet .NET Package Management Daniel Fisher | devcoach
  2. 2. devcoach.com devcoach.com BERTAUNG + SCHULUNG + PROJEKTE • Themen – Architektur & Technologie Evaluierung, Performance Optimierung, Entwicklungs- Unterstützung, Security Reviews, QA, POC & Know-how-Transfer • Technologien – Services: WCF & WF – Data: ADO.NET & EF – Web: ASP.NET, MVC & Silverlight • Kunden – Versicherung, Finanzindustrie, Mittelstand, Handel, Kommunikation, Softwarehersteller… Und sie? • Kontakt – info@devcoach.com
  3. 3. devcoach.com Daniel Fisher • devcoach.com – Mit-Gründer und Geschäftsführer • Justcommunity.de – Mit-Gründer und Vorstand • nrwconf.de – Mit-Gründer und Organisator • netug-niederrhein.de – Mit-Gründer und Leiter • microsoft.com – Community Leader & Insider (CLIP) – Certified Professional Developer – Business Platform Technology Advisor • lennybacon.com – Blog • twitter.com – @lennybacon
  4. 4. devcoach.com Efficient Communication…
  5. 5. devcoach.com
  6. 6. devcoach.com I want to use that library…
  7. 7. devcoach.com
  8. 8. devcoach.com
  9. 9. devcoach.com Packages • A package is a bundle of something you want to reuse. – It can have dependencies to other packages. – It can contain files: • Assemblies • Content • Tools
  10. 10. devcoach.com NuGet to the Rescue
  11. 11. devcoach.com What is NuGet • Open Source Project initiated by Microsoft – http://nuget.codeplex.com/ • Intended to solve the issues related to management of 3rd party assembly dependencies – Microsoft Non .NET Framework stuff – Open Source Libraries – You own libraries!
  12. 12. devcoach.com Of course it was inspired by… • Linux RPM Package Manager • Ruby Gems • …
  13. 13. devcoach.com And there are others • OpenWrap – http://www.openwrap.org/ • Bricks – http://bricksproject.org/ • NGem
  14. 14. devcoach.com NuGet Components C#C# WCF Data Services Gallery Server NuGet Core VS Addin Console App MsBuild Tasks Package Explorer
  15. 15. devcoach.com
  16. 16. devcoach.com Packages • NuGet packages follow the packaging specification… – Like Office 2010 whatever-X formats – …
  17. 17. devcoach.com The dark side …
  18. 18. devcoach.com Powershell Commands • Get-Package -ListAvailable • Install-Package {packageid} • Remove-Package {packageid}
  19. 19. devcoach.com
  20. 20. devcoach.com
  21. 21. devcoach.com Profiles • NuGet_profile.ps1
  22. 22. devcoach.com CREATING PACKAGES
  23. 23. devcoach.com NuSpec <?xml version="1.0"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>System.Web.Mvc</id> <version>3.0</version> <authors>Microsoft Corporation</authors> <owners>Microsoft Corporation</owners> <licenseUrl>http://www.asp.net/mvc</licenseUrl> <projectUrl>http://www.asp.net/mvc</projectUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>The Microsoft MVC Framework.</description> <tags>ASP.NET MVC</tags> </metadata> </package>
  24. 24. devcoach.com NuSpec <?xml version="1.0"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>$id$</id> <version>$version$</version> <authors>$author$</authors> <owners>$author$</owners> <licenseUrl>http://www.asp.net/mvc</licenseUrl> <projectUrl>http://www.asp.net/mvc</projectUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>$description$</description> <tags>ASP.NET MVC</tags> </metadata> </package> [assembly: AssemblyTitle("MyLibrary")] [assembly: AssemblyDescription("My cool library")] [assembly: AssemblyCompany("Daniel Fisher")] [assembly: AssemblyProduct("devcoach super tools")] [assembly: AssemblyVersion("0.9.0.0")]
  25. 25. devcoach.com
  26. 26. devcoach.com Console App
  27. 27. devcoach.com Console Commands • pack {package.nuspec} • push {package.nupkg} {your_api_key} -src {your_nuget_server}
  28. 28. devcoach.com CREATING ADVANCED PACKAGES
  29. 29. devcoach.com
  30. 30. devcoach.com Content • /content
  31. 31. devcoach.com
  32. 32. devcoach.com Dynamic Content • File Extension: *.pp • Template Parameters – http://msdn.microsoft.com/en- us/library/eehb4faa(v=vs.80).aspx
  33. 33. devcoach.com
  34. 34. devcoach.com Transformation
  35. 35. devcoach.com
  36. 36. devcoach.com Powershell • Install.ps1 • Uninstall.ps1 • Init.ps1
  37. 37. devcoach.com
  38. 38. devcoach.com
  39. 39. devcoach.com MsBuild Task <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="PackageBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="NuPack.NuGet.NuPack" AssemblyFile="NuGet.MSBuild.dll" /> <ItemGroup> <NuSpecFiles Include="..*.**.nuspec" /> </ItemGroup> <Target Name="PackageBuild"> <NuGet.MSBuild.NuGet Condition="Exists(@(NuSpecFiles))" SpecFile="@(NuSpecFiles)" PackageDir="..bin" /> </Target> </Project>
  40. 40. devcoach.com NuGet Gallery Server • The server side repository for packages. – Alternative to a local directory or UNC path. • Provides an OData interface. – WCF Data Service – Atom PubSub-Feed • http://www.odata.org
  41. 41. devcoach.com NuGet Gallery Server
  42. 42. devcoach.com
  43. 43. devcoach.com Where do I get it? • VS Addin: NuGet Package Manager – http://visualstudiogallery.msdn.microsoft.com/en- us/27077b70-9dad-4c64-adcf-c7cf6bc9970c • Console App – http://nuget.codeplex.com/ • MsBuild Tasks – http://nuget.codeplex.com/ • NuGet Explorer – http://nuget.codeplex.com/ • Gallery Server – http://galleryserver.codeplex.com/
  44. 44. devcoach.com Thank You! @lennybacon

×