According to the MSDN the method GetTeamProjectCollection(RegisteredProjectCollection projectCollection, ICredentialsProvider fallbackCredentialsProvider of the TfsTeamProjectCollectionFactory class is now deprecated:
-
“Note: This API is now obsolete.”
-
[ObsoleteAttribute("This method has been deprecated and will be removed in a future release. See GetTeamProjectCollection(RegisteredProjectCollection) instead.", false)]
The advice is to use the overload that only takes the RegisteredProjectCollection, but what should we use from now on if we want a fallback mechanism for credentials?
Thanks
You need to use the new TfsTeamProjectCollection constructor along with this TfsClientCredentials constructor which allows interactive prompts for authentication.