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.
Thursday, June 19, 2008
WCF - The type name ServiceReference1 does not exist in the type Namespace.ClassName
Subscribe to:
Post Comments (Atom)

19 comments:
Very good find. Saved me a lot of heartache.
Excellent, been wracking my head over this on and off for a few hours!
Thanks for posting this. You solved my problem.
Ditto
I love you for this.
Thanks a lot for this ! :)
Great find. Saved me major pain.
Great find. Saved me major pain.
Great:) Solved my problem.
Great Work!!
Another thank you... worked a charm!
Thanks
I had been going at this for over an hour.
Thanks a lot, my pain has gone
That was my headache, too! Thx!
Thank you!
Thanks for saving me lots of time, great post...
--engin
thanks a lot dude..really helped me..
I want you to have my baby.
Post a Comment