Info: C#, Visual Studio 2010
I am trying to access the existing service references and am not sure how, I can achieve the following to get all 'references'
DTE2 test = Package.GetGlobalService(typeof(SDTE)) as DTE2;
StringBuilder sb = new StringBuilder();
VSProject2 project = test.ActiveDocument.ProjectItem.ContainingProject.Object as VSProject2;
foreach (Reference item in project.References)
{
sb.AppendLine(string.Format("Name: {0}", item.Name));
}
MessageBox.Show(sb.ToString());
project does have the property:
project.WebReferencesFolder
but it is null (yes, I do have a service reference added, honest)