{"id":1939,"date":"2021-03-17T12:59:59","date_gmt":"2021-03-17T19:59:59","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=1939"},"modified":"2021-03-17T12:59:59","modified_gmt":"2021-03-17T19:59:59","slug":"performance-and-polish-with-nuget-5-9","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/performance-and-polish-with-nuget-5-9\/","title":{"rendered":"Performance and Polish with NuGet 5.9"},"content":{"rendered":"<h2>Getting started with NuGet 5.9<\/h2>\n<p>NuGet 5.9 is included in <a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">Visual Studio 16.9\u00a0<\/a>and .<a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/5.0\">NET 5.0<\/a> out of the box. You can also download NuGet 5.9 for Windows, macOS, and Linux as a <a href=\"https:\/\/dist.nuget.org\/win-x86-commandline\/v5.9.0\/nuget.exe\">standalone executable<\/a>.<\/p>\n<p>NuGet 5.9 is one of many releases in our .NET unification journey. Our NuGet tooling helps developers discover new .NET packages to use for their .NET applications, while making package management easier during your daily development.<\/p>\n<h2>NuGet 5.9 Highlights<\/h2>\n<p>There are many <a href=\"https:\/\/docs.microsoft.com\/nuget\/release-notes\/nuget-5.9\">important improvements in NuGet 5.9<\/a>:<\/p>\n<ul>\n<li>Manage solutions easier with <a href=\"#floating-versions-in-solution-level-package-manager\">Floating Versions Support<\/a>.<\/li>\n<li>Know where your packages come from with <a href=\"#content-hash-source-details-for-packages\">Content Hash &amp; Source Information<\/a>.<\/li>\n<li>Quickly update your packages with <a href=\"#update-package-context-menu-action\">Right Click -&gt; Update&#8230;<\/a>.<\/li>\n<li>Be even more productive with <a href=\"#visual-studio-package-manager-improvements\">Visual Studio Package Manager Improvements<\/a>.<\/li>\n<li>See improved visuals with <a href=\"#new-polished-icons-in-package-manager\">Polished Icons for NuGet<\/a>.<\/li>\n<\/ul>\n<h2>Floating Versions in Solution-Level Package Manager<\/h2>\n<p>We heard that there were challenges when specifying <a href=\"https:\/\/docs.microsoft.com\/nuget\/consume-packages\/package-references-in-project-files#floating-versions\">floating versions<\/a> in your projects, and you will now see the requested version and what version was ultimately resolved. We hope this improves your experience using floating version notation with NuGet.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/floatingversion-1.png\" alt=\"Requested version in solution level Package Manager\nUI\" \/><\/p>\n<h2>Content Hash &amp; Source Details for Packages<\/h2>\n<p>One challenge we\u2019ve heard from you is knowing where your package is coming from &amp; the specific contents of that package. Fear not, we\u2019ve now added additional improvements into the <a href=\"https:\/\/docs.microsoft.com\/en-us\/nuget\/consume-packages\/managing-the-global-packages-and-cache-folders\">global package folder<\/a> &amp; installation logs so you can check exactly what package source &amp; content hash was restored by NuGet.<\/p>\n<p>You can now view this information in the contents of the respective <strong>.nupkg.metadata<\/strong> file of the package you\u2019re interested in.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/metadata-1.png\" alt=\"\" \/><\/p>\n<p>Additionally, when installing a package, you\u2019ll see the same information to ensure the right package was restored at install time.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/installlog-1.png\" alt=\"\" \/><\/p>\n<h2>Update Package Context Menu Action<\/h2>\n<p>We heard that you wanted the ability to quickly update packages within the solution explorer. In this release, you can now right click on package(s) you&#8217;d like to update.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/update1-1.png\" alt=\"\" \/><\/p>\n<p>This will then automatically select the packages in the package manager for you to update.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/update2-1.png\" alt=\"\" \/><\/p>\n<h2>Visual Studio Package Manager Improvements<\/h2>\n<p>In NuGet 5.9 &amp; Visual Studio 2019 16.9, we have continued to improve the performance of managing your project\u2019s packages. Here is a small list of the improvements we\u2019ve made so far that was benchmarked against the <a href=\"https:\/\/github.com\/OrchardCMS\/OrchardCore\">OrchardCore<\/a> project that contains over 150 projects, and what you can expect soon.<\/p>\n<ul>\n<li>16&#046;7 \u2013 We made it instantaneous to switch between the installed &amp; update tabs.<\/li>\n<li>16&#046;8 \u2013 We improved the performance of updating packages (upgrading\/downgrading) to be up to 14x faster.<\/li>\n<li><strong>16&#046;9 \u2013 We improved the performance of uninstalling packages to be up to 5x faster.<\/strong><\/li>\n<li>16&#046;10 (Upcoming) \u2013 We improved the performance of installing packages to be up to 7x faster.<\/li>\n<\/ul>\n<p>We believe with these changes, that managing your dependencies in Visual Studio will be faster than ever and we\u2019re excited for you to try them out by updating to the latest version of Visual Studio.<\/p>\n<h2>New &amp; Polished Icons in Package Manager<\/h2>\n<p>We\u2019ve heard that a number of icon choices in Visual Studio didn\u2019t quite make sense to you. In this release, we\u2019ve improved a number of different areas.<\/p>\n<p>First, we\u2019ve changed the \u201cManage NuGet Packages\u2026\u201d context menu to have an official NuGet icon.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/managenugetpackages-1.png\" alt=\"\" \/><\/p>\n<p>Next, when a package is on the latest version, many users found a down-arrow to be confusing as to whether an update is available, so we reverted a change to bring back the old green checkmark confirming you\u2019re on the latest version of the package.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/greencheck-1.png\" alt=\"\" \/><\/p>\n<p>Finally, we improved the experience of deprecation icons to be a bit more reliable &amp; appear where you need to see them the most.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/03\/deprecated-1.png\" alt=\"\" \/><\/p>\n<h2>Known Issues<\/h2>\n<p>NuGet 5.9 includes support for .NET 5, and therefore requires you to be using the same minor version of tooling.<\/p>\n<p><strong>It is advised to ensure that you are on the same version of tooling in your environments. Visual Studio 16.9, MSBuild 16.9, and .NET 5.0 require NuGet 5.9 or later.<\/strong><\/p>\n<p>One such way of ensuring you have the same version of tooling being used in your environments is to use MSBuild, Visual Studio, or the dotnet CLI. You can get started with NuGet restore in each of these scenarios in the following way:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/nuget\/consume-packages\/package-restore#restore-using-msbuild\">MSBuild restore<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/nuget\/consume-packages\/package-restore#restore-using-visual-studio\">Visual Studio<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/nuget\/consume-packages\/package-restore#restore-using-the-dotnet-cli\">dotnet restore<\/a><\/li>\n<\/ul>\n<h2>Closing<\/h2>\n<p>NuGet 5.9 is a great release that brings a refined experience to everything package management. We\u2019ve added a bunch of exciting quality of life improvements while also bringing you a more performant package management experience.<\/p>\n<p>We\u2019re excited to see you use NuGet 5.9 &amp; include it in your toolset to build amazing things with .NET.<\/p>\n<p>For more details on NuGet 5.9, see our <a href=\"https:\/\/docs.microsoft.com\/nuget\/release-notes\/nuget-5.9\">official release notes<\/a>.<\/p>\n<h2>Feedback<\/h2>\n<p>Your feedback is important to us. If there are any problems with this release, check our <a href=\"https:\/\/github.com\/NuGet\/Home\/issues\">GitHub Issues<\/a> and <a href=\"https:\/\/developercommunity.visualstudio.com\/\">Visual Studio Developer Community<\/a> for existing issues. For new issues within NuGet, please report a <a href=\"https:\/\/github.com\/NuGet\/Home\/issues\/new\">GitHub Issue<\/a>. For general NuGet experience issues, let us know via the <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio\">Report a Problem<\/a> option found in your favorite IDE under <strong>Help &gt; Report a Problem.<\/strong><\/p>\n<p>Additionally, to see what is coming next to NuGet, view <a href=\"https:\/\/github.com\/NuGet\/Home\/pulls\">our public proposals<\/a> or <a href=\"https:\/\/github.com\/NuGet\/Home\/blob\/dev\/meta\/README.md\">create your own proposal<\/a>. Be sure to leave your feedback on existing issues &amp; pull requests!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NuGet 5.9 is a great release that brings a refined experience to everything package management. We\u2019ve added a bunch of exciting quality of life improvements while also bringing you a more performant package management experience.<\/p>\n<p>We\u2019re excited to see you use NuGet 5.9 &#038; include it in your toolset to build amazing things with .NET.<\/p>\n","protected":false},"author":551,"featured_media":1801,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7874,7930],"tags":[104,7957,7958],"class_list":["post-1939","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nuget","category-release-announcement","tag-nuget","tag-nuget-5-9","tag-visual-studio-16-9"],"acf":[],"blog_post_summary":"<p>NuGet 5.9 is a great release that brings a refined experience to everything package management. We\u2019ve added a bunch of exciting quality of life improvements while also bringing you a more performant package management experience.<\/p>\n<p>We\u2019re excited to see you use NuGet 5.9 &#038; include it in your toolset to build amazing things with .NET.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/551"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=1939"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1939\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/1801"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=1939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=1939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=1939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}