Presentation is loading. Please wait.

Presentation is loading. Please wait.

DotnetConf 9/10/2018 7:49 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.

Similar presentations


Presentation on theme: "DotnetConf 9/10/2018 7:49 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE."— Presentation transcript:

1 dotnetConf 9/10/2018 7:49 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 NuGet Deep Dive: Accelerating your .NET Development
dotnetConf 9/10/2018 7:49 PM NuGet Deep Dive: Accelerating your .NET Development Harikrishna Menon Senior Program Manager – NuGet @devatmic © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

3 What is NuGet? Package manager for Microsoft Dev Platforms Share Code
dotnetConf 9/10/2018 7:49 PM What is NuGet? Package manager for Microsoft Dev Platforms Easy to use package manager for .NET - C#, VB, F#, C++/CLI Share Code Share code across your teams by building commonly used pieces of functionality and sharing it out Have fine grained dependency management Accelerate your development Use open source libraries that fit your licensing needs to accelerate your development Stop reinventing the wheel Open Source Nuget is open source from day 1 and guess what, we accept contributions! © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4 Creating and Publishing NuGet packages
dotnetConf 9/10/2018 7:49 PM Creating and Publishing NuGet packages © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 Notes: Please welcome the .NET Standard Library [explain details]

6 dotnetConf 9/10/2018 7:49 PM Community Tools NuGet Package Explorer: Explore packages and build them visually NuSpec Reference Generator: Generate dependencies for nuspec NuProj: Advanced nuget package creator with VS integration © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 Publishing your package
dotnetConf 9/10/2018 7:49 PM Publishing your package © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8 Publishing Options Public Private NuGet.Org NuGet.Server VSTS
dotnetConf 9/10/2018 7:49 PM Publishing Options Public Private NuGet.Org NuGet.Server VSTS 3rd party © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 Other Package Management Options
dotnetConf 9/10/2018 7:49 PM Other Package Management Options Host your own NuGet Gallery If you want to, you can pretty much re-host NuGet.org in your domain and with custom branding Other 3rd party package management products myget ProGet Nexus Repository Artifactory and more… © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10 More Packaging Scenarios
dotnetConf 9/10/2018 7:49 PM More Packaging Scenarios Bait and Switch packages Enables access to native implementation from a PCL Native implementation exposed through a reference assembly for a PCL Solution level packages Installs a tool or additional commands for the Package Manager console No longer supported in and above Meta Packages Packages that don’t have any content except for its dependencies Easier for customers to consumer a SDK as a whole instead of individual packages Creating packages during Build Easily add a AfterBuild Task to your csproj that can create a NuGet package after successful builds <Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'"> <Exec Command="nuget pack myproject.csproj -Prop Configuration=Release“/></Target> © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 Moving to Project.json dotnetConf 9/10/2018 7:49 PM
© 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

12 Why project.json? Global packages Transitive restore
dotnetConf 9/10/2018 7:49 PM Why project.json? Disclaimer: project.json will evolve to live inside MSBUILD projects by end of the year. Upgraders are in plan. Global packages Shared packages folder for project.json based projects. Faster restores! Transitive restore Only direct dependencies are added to project.json, indirect dependencies are pulled in during restore P2P dependency flow No need to install reference project dependencies on top level projects. Dependencies flow automatically Better Security Scripts don’t modify your system, VS or project © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 packages.config to project.json
dotnetConf 9/10/2018 7:49 PM packages.config to project.json > BACKUP csproj and packges.config > uninstall the packages from UI or PMC > delete packages.config > remove references to assemblies in csproj > create a project.json in the root of your project > add dependency > build (restores packages) { "dependencies": {}, "frameworks": { "net45": { } }, "runtimes": { "win": { } } } { "dependencies": {"Newtonsoft.Json": "7.0.1" }, "frameworks": { "net45": { } }, "runtimes": { "win": { } } } © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 a less complex way to do this 
dotnetConf 9/10/2018 7:49 PM a less complex way to do this  coming this summer!!! © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 Sharing code in .NET today and tomorrow
dotnetConf 9/10/2018 7:49 PM Sharing code in .NET today and tomorrow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 .NET today—app models and libraries
.NET FRAMEWORK .NET CORE XAMARIN MODELS APP LIBRARIES BASE Compilers Languages Runtime components COMMON INFRASTRUCTURE Base Class Library Core Library Mono Class Library ASP.NET Windows Forms WPF UWP ASP.NET Core iOS Android OS X Challenges Difficult to reuse skills Need to master 3+1 base class libraries Difficult to reuse code Need to target a small common denominator Difficult to innovate Need implementations on each platform Notes: Even if we are reusing a lot across components (especially with the open sourcing last year), the reality is that each platform has its own implementation of the base libraries. Note: .NET Framework BCL and Mono BCL are the same APIs, different implementation. .NET Core “Core Library” is a similar set of APIs, but different.

17 COMMON INFRASTRUCTURE
.NET tomorrow Compilers Languages Runtime components COMMON INFRASTRUCTURE XAMARIN iOS Android OS X .NET STANDARD LIBRARY One library to rule them all .NET FRAMEWORK ASP.NET Windows Forms WPF .NET CORE UWP ASP.NET Core Reuse skills Master one library, not a platform Reuse code Big surface area - no small common denominator Faster innovation .NET Standard can grow without updating platforms Notes: Please welcome the .NET Standard Library [explain details]

18 .NET CLI The new modern way of creating nuget packages with .NET CLI
dotnetConf 9/10/2018 7:49 PM .NET CLI The new modern way of creating nuget packages with .NET CLI > dotnet new > dotnet restore > code . > {{CODE ON, EDIT METADATA}} > dotnet pack Easily create single assembly nuget packages targeting netcoreapp or netstandard (Modern PCL) © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 What's next for NuGet dotnetConf 9/10/2018 7:49 PM
© 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

20 Coming up soon…. NuGet Clients NuGet.org Docs Semver 2.0.0
dotnetConf 9/10/2018 7:49 PM Coming up soon…. Plans subject to change . Once we finalize, it will be posted in our wiki NuGet Clients Semver 2.0.0 NuGet Upgrader NuGet Package Source Analyzer NuGet Authoring Tools in VS/Xamarin Studio NuGet.org Staging Docs A much better doc story hosted at with samples, getting started guides, videos and more © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21 resources docs: http://docs.nuget.org blog: http://blog.nuget.org/
dotnetConf 9/10/2018 7:49 PM resources docs: blog: contribute: issues: (client), (gallery) feedback: @nuget © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22 dotnetConf 9/10/2018 7:49 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "DotnetConf 9/10/2018 7:49 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE."

Similar presentations


Ads by Google