I added a web reference to my project. The reference is clearly visible within my solution. I have been able to instantiate all classes within the Reference.cs file but one. When I opened the Reference.cs file the class was not there. There is documentation of the existence of that class, but the class does not exist within my Reference file. I am using .Net 2005/2008. Could there be something wrong within .Net, If so are their any other ways around this?
A:
Have you correctly decorated the class with a [DataContract] attribute before generating the proxy? Does that class even exist in the webservice you targeted (you haven't generated a proxy against an old version of the service)?
slugster
2010-02-11 21:48:59
A:
Another idea that catches me occasionally.
If your server-side DataContract class is named the same as a class you're using local to the client of the web service, Visual Studio re-uses types by default. Right-click on the Service Reference, Click on Configure and turn off Type re-use. No need to regenerate the reference, it should auto re-configure. If your class "appears", you might want to separate your naming.
Program.X
2010-02-11 21:51:36