2012-11-06 18 views

risposta

6
using Microsoft.TeamFoundation.Client; 
using Microsoft.TeamFoundation.Server; 

private static string RetrieveProjectPortalBaseAddress(TfsTeamProjectCollection tfs, string teamProject) 
{ 
    IRegistration registration = (IRegistration)tfs.GetService(typeof(IRegistration)); 
    RegistrationEntry[] entries = registration.GetRegistrationEntries("TeamProjects"); 
    ServiceInterface endpoint = entries[0].ServiceInterfaces.FirstOrDefault(si => si.Name == teamProject + ":Portal"); 
    return endpoint.Url; 
} 
+0

Grazie, esattamente quello che stavo cercando – ulfgebhardt

+0

C'è un modo per ottenere anche il percorso del server di report INTERO? Posso trovare solo le parti specifiche del progetto. –

Problemi correlati