News

Laurent Kempé MVP JetBrains Academy Member

Contact

My status

View Laurent Kempé's profile on LinkedIn
XING
twitter
facebook


Xbox 360



Map

Locations of visitors to this page

.NET Dudes

Family

French .NET Dudes

Friends

Links

Tech Head Brothers

WCF Add Service Reference issue with Visual Studio 2008 SP1

The other day I faced a strange issue when I wanted to add a service reference to the Tech Head Brothers authoring tool. The code generated wasn’t compiling with errors located in the file Reference.cs.

Drilling down the issue I figured out that the default namespace, TechHeadBrothers.Word, was the issue. It was just added at some place and at other not.

I made then a quick test with another assembly which had no dot in it’s name. That’s was it! The issue was the dot into the Assembly name, Default namespace.

Don’t use . in the name of your Assembly name, Default namespace to get back to normal state, weird!

Comments

GS Ryu said:

I saw your comment at timeheuer's blog.

I thought the reason is something different.

My Project's assembly name and namespace dose not contains any dot, but that symtom is still exist.

# October 15, 2008 11:59 PM

lkempe said:

GS Ryu: Nevermind, good luck in your searching then!

# October 16, 2008 3:04 AM

GDL said:

In my case it seemed to depend on project namespace and main form having the same name: "TestHarness".

In that case Reference.cs contained "TestHarness.TestHarness.WCFCommunicatorServiceReference" (leading to build errors) and after renaming the form to "TestHarnessMain" it changed to "TestHarness.WCFCommunicatorServiceReference".

HTH

# October 21, 2008 12:41 PM

Patel said:

It worked for me when I renamed main form name different than name space. Just like what GDL suggested

# October 30, 2008 3:30 PM

Shailendra said:

In my case, I have got DataContract classes created twice.

public partial class XXXX : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {}

public partial class XXXX : object, System.ComponentModel.INotifyPropertyChanged {}

This error disaapears when i remove FaultContract from service interface. Any help

# November 14, 2008 4:45 AM

noox said:

I had the same problem with the dublicate classes/properties and RaisePropertyChanged method after I had added a lot of code to the service.

On this blog (it.toolbox.com/.../wcf-svcutil-proxy-generation-issues-25084) I found a hint: "For some reason, if SvcUtil can't find one of the types referenced in the services, it generates proxies for all types even if the defining assembly has been referenced correctly."

I had forgotten to add "[DataContract]" to one of the classes used by the service methods. After I added it the problem was gone.

# February 10, 2009 6:38 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)