I am trying to get an email address from an IdentityRef.
IdentityRef test = (IdentityRef)workItem.Fields["System.CreatedBy"];
var test2 = test.UniqueName;
var tfs = new TfsTeamProjectCollection(uri, credentials);
tfs.GetService<IIdentityManagementService2>();
var test3 = identityService.ReadIdentity(test2);
This code gives me "CS0246 The type or namespace name 'TfsTeamProjectCollection' could not be found (are you missing a using directive or an assembly reference?)"
I have tried a variety of "using" directives to get TfsTeamProjectCollection to recognize:
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.Framework.Common;
using Microsoft.TeamFoundation.VersionControl.Client;
using assembly Microsoft.TeamFoundation.Client;
using namespace Microsoft.TeamFoundation.Client;
All of these give me some combination of "IDE0005: Using directive is unnecessary", "CS0234: The type or namespace name 'Foo' does not exist in the namespace 'Bar'", "CS0103: The name 'Foo' does not exist in the current context".
I have Microsoft.TeamFoundationServer.Client, Microsoft.TeamFoundationServer.ExtendedClient, Microsoft.VisualStudio.Services.Client, Microsoft.VisualStudio.Services.InteractiveClient installed