Posts

Showing posts from September, 2014

WCF - The type name ServiceReference1 does not exist in the type Namespace.ClassName

I am posting this post as a note to myself. :)

WCF - The type name ServiceReference1 does not exist in the type Namespace.ClassName This is a short blog post about a strange error when adding a WCF service reference. A WCF service was created and I wanted to add a service reference to a client project. I added the reference through Visual Studio and everything went fine until I compiled. Then I got this error:
Error    3    The type name 'ServiceReference1' does not exist in the type 'MyWorld.MyWorld' ...\Service References\ServiceReference1\Reference.cs

I found that this is caused by me having the same namespace name as class name (MyWorld.MyWorld = Namespace.ClassName). Change your namespace to a name that is not the same name as your class and this will compile.

I've copied this from http://bursjootech.blogspot.com/2008/06/wcf-type-name-servicereference1-does.html