I have a Solution with 2 projects, ServiceProj and UIProj (winforms). ServiceProj contains a WebService, a bunch of classes, and a DataSet. When I add the WebReference of ServiceProj to the UIProj, I can see the web methods, but cannot see the classes of ServiceProj.
My classes are all public, non-static, and they are in ServiceProj.Classes.Entities namespace. I can access them inside web service and therefore use them in web methods and I can call the web methods in my UIProj, but I cannot directly access the classes from UIProj.
Do you know where I may be going wrong?
If you want to see the classes in from another project you have to add a project reference as well (right click references, add reference) to that project.
By adding a web reference to another project you are generating:
So with only your web reference you’ll be able to see all web methods and custom types that are returned by or passed to the web methods.
[answer is based on VS2010 and not VS2012]