MyGetDocs icon indicating copy to clipboard operation
MyGetDocs copied to clipboard

Reference: package restore from MyGet during Visual Studio Online build

Open maartenba opened this issue 10 years ago • 8 comments

Explain how to do package restore in Visual Studio Online build

maartenba avatar Oct 15 '15 15:10 maartenba

/cc @xavierdecoster

maartenba avatar Oct 15 '15 15:10 maartenba

This would be a page similar to the one for TeamCity http://docs.myget.org/docs/how-to/consume-a-private-feed-in-teamcity ?

Now would be a great time for this ;-)

The 2.0 update of the Nuget Installer task has 2 first-class citizens: nuget.org and the VSTS feed (built-in package repo).

The tooltip says:

You can either select a feed from VSTS and/or NuGet.org here, or commit a nuget.config file to your source code repository and set its path here.

Pre-authenticated url would be easy to add, but some guidance on how to do this with the regular url (basic auth) url would be great. Both for hosted and on-prem builds.

DavidDeSloovere avatar Aug 04 '17 13:08 DavidDeSloovere

PR's are always welcome ;-)

maartenba avatar Aug 04 '17 14:08 maartenba

If I knew how to do it correctly, I wouldn't be asking for the docs page :grin:

DavidDeSloovere avatar Aug 05 '17 07:08 DavidDeSloovere

Should be very similar to http://docs.myget.org/docs/how-to/publish-to-myget-from-a-vsts-build :-)

maartenba avatar Aug 05 '17 08:08 maartenba

The big difference is that the feed must be add to the nuget.config for external feeds. Can't define it anymore in VSTS and just select it.

Internal feeds image

External feeds - you can add credentials image

I'll figure it our once I have to upgrade to the newest version of the build task. In v0 of the build task, this was different. With our own build server, the myget feed is stored in the nuget.config at some root level. And that still works perfectly.

DavidDeSloovere avatar Aug 05 '17 12:08 DavidDeSloovere

Oh nice to see VSTS making it harder :-) Yeah NuGet.config I'd the way to go I think

maartenba avatar Aug 05 '17 13:08 maartenba

Just checked there should be an older task that can be used (or this one and NuGet.config)

maartenba avatar Aug 05 '17 15:08 maartenba