Jesse Houwing 10 Jun, 2016
For the quick answer jump directly to the conclusionYesterday I was setting up the build for an ASP .NET Core (Web API) application I wrote, this application was using a package from the VSTS Package Management repository. To setup this build I was using the new dotnet Core tooling (in preview) which is available when creating a new Build Definition:




dotnet restore
command doesn’t currently support encrypted credentials, so I will need to specify a Personal Access Token in plain text.
Really? I mean, really!?!?
I don’t want to do that. I don’t want to save passwords, tokens etc..of any kind in clear text and in source control!
Fortunately reading further ahead I saw this lines:Note that as of NuGet 3.4.0, theSo I replaced the .NET Core Restore Task with the Nuget Restore Task and restarted the build:nuget restore
command can be used in place of thedotnet restore
command.nuget restore
works with any of the auth mechanisms outlined on this page.





Conclusion
The easiest way to solve this problem is to replace the .NET Core Restore task and use the Nuget Restore task and to set the version to 3.5.0 – build 1938 (rc2) in the advanced properties.by Marco Mansi