Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Visual Studio Team Services as a NuGet feed in LINQPad

I am using LINQPad 5 and VSTS (visual studio team services) I have a NuGet feed (v3) in VSTS and I would like to use packages from there(private) in LINQPad

I have tried using the personal access token from VSTS as the NuGet password in LINQPad I have tried putting the VSTS credential provider for nuget in AppData\Local\NuGet\CredentialProviders
I have tried putting the VSTS credential provider for nuget in AppData\Local\LINQPad\NuGet\CredentialProviders
I have tried using my VSTS username and password as the nuget credentials

How is this done? Is there a bug in LINQPad? Is this not supported yet?

like image 218
Arch Avatar asked Nov 09 '16 19:11

Arch


2 Answers

We managed to get it to work by using the v2 nuget API:

/nuget/v2

instead of:

/nuget/v3/index.json

Just put the personal access token in the password text box on LINQPad Package Sources dialog box.

like image 144
Eric Avatar answered Nov 01 '22 16:11

Eric


My current way of getting it to work is as follows:

  • use nuget v2 feed https://<instance>.pkgs.visualstudio.com/_packaging/<feed>/nuget/v2
  • put the personal access token in the password text box
    • make sure the access token is still valid...
  • restart linqpad when in doubt! It seems to cache some old credentials (e.g. expired PAT) sometimes
  • try disabling other feeds so you only have one feed enabled
  • this helps sometimes: under advanced, enable use legacy search engine (v2)
like image 21
Alex AIT Avatar answered Nov 01 '22 16:11

Alex AIT