{"id":34115,"date":"2017-07-18T10:08:32","date_gmt":"2017-07-18T17:08:32","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/devops\/?p=34115"},"modified":"2019-02-14T15:51:28","modified_gmt":"2019-02-14T23:51:28","slug":"improved-package-support-in-team-build","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/improved-package-support-in-team-build\/","title":{"rendered":"Improved package support in Team Build"},"content":{"rendered":"<p>We know that packages are a key way to bring in dependencies and to share your work with your users, and we know many of you are using private package sources (like Package Management, Artifactory, MyGet, and others) to develop packages inside your organization. To improve those workflows, over the past two sprints, we&#8217;ve released major improvements to the <strong>NuGet<\/strong>, <strong>npm<\/strong>, and <strong>Maven<\/strong> build tasks in Team Build.<\/p>\n<h2>What&#8217;s new<\/h2>\n<ul>\n<li>Better support for Package Management feeds, whether you&#8217;re restoring or publishing packages<\/li>\n<li>Cleaner workflow, with no risk of clashing parameters between the task configuration and your custom options<\/li>\n<li>Improved service endpoint integration for working with external package sources from public sources like NuGet.org to private sources like Artifactory or a VSTS\/TFS package feed outside the account\/collection running the build<\/li>\n<\/ul>\n<h2>NuGet<\/h2>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/devops\/?attachment_id=34125\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/07\/nuget-300x214.png\" alt=\"NuGet and NuGet Tool Installer tasks in a new build\" width=\"300\" height=\"214\" class=\"wp-image-34125 size-medium alignright\" \/><\/a><\/p>\n<p>We&#8217;ve combined the old NuGet Installer\/NuGet Restore, NuGet Packager, NuGet Publisher, and NuGet Command tasks into a single\u00a0<strong>NuGet\u00a0<\/strong>task. This brings the NuGet task inline with the rest of the task catalog and reduces the noise when you&#8217;re selecting tasks for your build.<\/p>\n<p>We also created a new\u00a0<strong>NuGet Tool Installer\u00a0<\/strong>task. This is the new way to control the version of NuGet used in your build. By default, the NuGet task uses NuGet 4.0.0; you can use a Tool Installer task to use any version available from <a href=\"http:\/\/dist.nuget.org\/tools.json\">dist.nuget.org\/tools.json<\/a>. If you want to use a new pre-release version of NuGet on day one, now you can!<\/p>\n<p><strong>Other\u00a0highlights:<\/strong><\/p>\n<ul>\n<li>We&#8217;ve introduced feed pickers for the\u00a0<em>restore<\/em> and\u00a0<em>push<\/em> commands &#8211; no need to copy\/paste a feed URL anymore!<\/li>\n<li>You can now provide &#8220;Credentials for feeds outside this account\/collection&#8221; during restore and push, using the new NuGet service endpoint type. These credentials will be matched to package sources in your NuGet.config and provided to the build before your command is run.<\/li>\n<li>If you&#8217;re pushing to a VSTS\u00a0feed and using a Windows build agent, you can now &#8220;Allow duplicates to be skipped&#8221;. This is useful if you want to produce an entire set of packages, but only publish the set of packages for which you incremented the version.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.visualstudio.com\/en-us\/docs\/build\/steps\/package\/nuget\">NuGet documentation<\/a><\/p>\n<h2>npm<\/h2>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/devops\/?attachment_id=34135\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/07\/npm-300x194.png\" alt=\"npm task in a new build\" width=\"300\" height=\"194\" class=\"wp-image-34135 size-medium alignright\" \/><\/a><\/p>\n<p>For npm, we focused mainly on better support for authenticated feeds, and also added a &#8220;command&#8221; selector to easily set up popular commands like install and publish.<\/p>\n<p><strong>Some top highlights:<\/strong><\/p>\n<ul>\n<li>As with NuGet, we&#8217;ve introduced feed pickers for the\u00a0<em>install\u00a0<\/em>and\u00a0<em>publish<\/em><span>\u00a0<\/span>commands &#8211; again, no need to copy\/paste a feed URL anymore!<\/li>\n<li>You can now provide &#8220;Credentials for registries outside this account\/collection&#8221;, using the new npm service endpoint type. These credentials will be matched to package sources in your .npmrc\u00a0and provided to the build before your command is run.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.visualstudio.com\/en-us\/docs\/build\/steps\/package\/npm\">npm documentation<\/a><\/p>\n<h2>Maven<\/h2>\n<p>The Maven task now supports authenticated feeds within the same VSTS account or TFS collection as the current build. Just add a feed to your pom.xml and the Maven step will add credentials automatically (and clean them up when finished).<\/p>\n<p><a href=\"https:\/\/www.visualstudio.com\/en-us\/docs\/build\/steps\/build\/maven\">Maven documentation<\/a><\/p>\n<h2>dotnet<\/h2>\n<p>We&#8217;ve made major improvements to the .NET Core task&#8217;s support for NuGet. All NuGet operations (e.g. dotnet nuget push, dotnet restore) are now available in the &#8220;command&#8221; selector in the task.<\/p>\n<p><span>We also created a new\u00a0.<strong>NET Core\u00a0<\/strong><\/span><strong>Tool Installer\u00a0<\/strong><span>task. This is the new way to control the version of dotnet used in your build.\u00a0<\/span><\/p>\n<p><strong>Other highlights:<\/strong><\/p>\n<ul>\n<li>As with NuGet, we&#8217;ve introduced feed pickers for the\u00a0<em>install\u00a0<\/em>and\u00a0<em>publish<\/em><span>\u00a0<\/span>commands &#8211; again, no need to copy\/paste a feed URL anymore!<\/li>\n<li>You can now provide &#8220;Credentials for feeds outside this account\/collection&#8221; during restore and push, using the new NuGet service endpoint type. These credentials will be matched to package sources in your NuGet.config and provided to the build before your command is run.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We know that packages are a key way to bring in dependencies and to share your work with your users, and we know many of you are using private package sources (like Package Management, Artifactory, MyGet, and others) to develop packages inside your organization. To improve those workflows, over the past two sprints, we&#8217;ve released [&hellip;]<\/p>\n","protected":false},"author":734,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1],"tags":[],"class_list":["post-34115","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops"],"acf":[],"blog_post_summary":"<p>We know that packages are a key way to bring in dependencies and to share your work with your users, and we know many of you are using private package sources (like Package Management, Artifactory, MyGet, and others) to develop packages inside your organization. To improve those workflows, over the past two sprints, we&#8217;ve released [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/34115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/734"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=34115"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/34115\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=34115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=34115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=34115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}