{"id":1404,"date":"2017-10-06T14:48:25","date_gmt":"2017-10-06T03:48:25","guid":{"rendered":"http:\/\/ntsblog.homedev.com.au\/?p=1404"},"modified":"2017-10-06T14:48:25","modified_gmt":"2017-10-06T03:48:25","slug":"vsts-package-management-teamcity-nuget-authentication-issue","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2017\/10\/06\/vsts-package-management-teamcity-nuget-authentication-issue\/","title":{"rendered":"VSTS package management with teamcity nuget authentication issue"},"content":{"rendered":"<div id=\"ntsbl-455702519\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><h2>The problem<\/h2>\n<p>You have your nuGet packages being hosted on VSTS, and published a feed via package managment.<\/p>\n<p>Using teamcity to setup a build where the visual studio solution needs to reference your custom nuGet packages from VSTS .<\/p>\n<p>You setup the first build step as &#8220;Nuget Installer&#8221; and configure it to restore your packages from the .sln file.<\/p>\n<p>When you run the build it will fail with authentication issues connecting to the VSTS Nuget feed, with a 401 Unauthorized.<\/p>\n<h2>The solution<\/h2>\n<p>In your build configuration: <\/p>\n<ol>\n<li>click &#8220;Build Features&#8221;. <\/li>\n<li>Choose &#8220;Add Build Feature<\/li>\n<li>In the drop down choose &#8220;nuGet Feed Credentials&#8221;<\/li>\n<li>Enter the path to your VSTS nuget package<\/li>\n<li>Enter your credentials<\/li>\n<li>Save it<\/li>\n<\/ol>\n<p>Now run your build and it will successfully authenticate you against VSTS and download your packages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The problem You have your nuGet packages being hosted on VSTS, and published a feed via package managment. Using teamcity to setup a build where [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1404","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/1404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=1404"}],"version-history":[{"count":0,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/1404\/revisions"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=1404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=1404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=1404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}