c# - Can you access 'Service Reference' Programmatically? -
information: C #, Visual Studio 2010
I'm trying to use existing service references Am I or not as DTE 2, make sure I get the following to get all the 'references'
DTE2 test = Package.GetGlobalService (typeof (SDTE)) ; Stringbilder sb = new stringbiller (); VSProject2 Project = test.ActiveDocument.ProjectItem.ContainingProject.Object as VSProject2; Foreach (reference item in context. Reference) {sb.AppendLine (string.Format ("name: {0}", item.Name)); } MessageBox.Show (sb.ToString ());
The property in the project is:
project.WebReferencesFolder
but this is zero (yes, I do A service reference has been added, honest)
See third example from MSDN sample:
< P> IVsWCFReferenceManager Reference Manager = refMgrFactory.GetReferenceManager (hierarchy); IVsWCFReferenceGroupCollection ReferencesGroup = ReferenceManager GETReferenceGroupCollection ();
I was after that namespace C: \ Program Files (x86) \ Microsoft Visual Studio 2010 Beta2 SDK \ VisualStudioIntegration in Microsoft.VisualStudio.WCFReference.Interop Common \ Assemblies \ Microsoft.VisualStudio.WCFReference.Interop.dll
Comments
Post a Comment