Consuming the "Add Service Reference" (.net 3.0)  
Author Message
Suraj Guptha





PostPosted: .NET Framework Networking and Communication, Consuming the "Add Service Reference" (.net 3.0) Top

Hi,

I have an existing application that creates a web project reference to a .net web service using the class from the Visual Studio dll, it essentially does the same thing that happens when i click on "Add Web reference" option in Visual Studio programatically.

ProjectItem webReferenceItem = ((VSProject2)project.Object).AddWebReference(_webServiceUrl);

VSProject2 class is present in the ..\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\VSLangProj80.dll

After i installed the Visual Studio Extensions in the IDE for .Net 3.0, i get an extra option called "Add Service Reference". I am trying to this programatically using the same VS dll, but unable to find the interface or class through which i can do this programtically. I.e, I am not able to do this

ProjectItem webReferenceItem = ((VSProject2)project.Object).AddServiceReference(_webServiceUrl);

because the VSProject2 interface does not contain AddServiceReference function. I am wondering where i can find this

Can anyone help

Thanks for your time,

Suraj Guptha




.NET Development8