support for CREDENTIALPROVIDERS for nuget in LinqPad

I am using VSTS package feed for my project and it requires custom credential provider for nuget feed authentication.
I tried putting VSTS Credential Provider at LinqPAd/nuget but it is not working. I doubt if LinqPad has support for it. can some one confirm if it is supported then how to configure it ?

FYI - for general info on credential provider


  • LINQPad doesn't support VSTS authentication right now. Have you tried creating a personal access token?
  • I tried that but that is not working. Any idea where LinqPad stores PAT after configuring ?
  • LINQPad feeds your proxy credentials to the NuGet library using the following code:
    static void SetupProxy ()
    	if (_proxySetupDone) return;
    	_proxySetupDone = true;
    	// Set up proxy handling for v3 sources.
    	// We need to sync the v2 proxy cache and v3 proxy cache so that the user will not
    	// get prompted twice for the same authenticated proxy.
    	var v2ProxyCache = global::NuGet.ProxyCache.Instance as IProxyCache;
    	global::NuGet.Protocol.Core.v3.HttpHandlerResourceV3.PromptForProxyCredentials = (uri, proxy, cancellationToken) =>
    		var v2Credentials = v2ProxyCache?.GetProxy (uri)?.Credentials;
    		if (v2Credentials != null && proxy.Credentials != v2Credentials)
    			// if cached v2 credentials have not been used, try using it first.
    			return Task.FromResult (v2Credentials);
    		return Task.FromResult (GetProxyCredentials());
    	global::NuGet.Protocol.Core.v3.HttpHandlerResourceV3.ProxyPassed = proxy =>
    		// add the proxy to v2 proxy cache.
    		v2ProxyCache?.Add (proxy);
    In addition, it populates the http_proxy environment variable before calling NuGet.Core library features such as search (crazy, I know, but that's the only way I know to get it to use a web proxy.)
  • Any clue when this issues will be fixed? I trued couldnt get this to work :(
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!