DataContract for enumerations in WCF

I have an enumeration that I use through the WCF service in a .Net project. Now I want to add another enumeration, specified in the same way as the first. But the second is not registered in Reference.cs and therefore is not recognized from a project using the WCF service.

I tried to overwrite everything when I read that there is an automatic account that is messy if one instance inserts enumeration elements. I checked that the reference to the service does not repeat the use of types in reference assemblies.

 [DataContract]
public enum SecondEnum
{
    [EnumMember(Value = "WWW")]
    WWW = 0x0,
    [EnumMember]
    VVV= 0x1,
 }

I tried to add a name and namespace, with no result. I checked, so there are no longer any links to FirstEnum that I would miss when writing SecondEnum. It seems that they were written the same way.

So why is the DataContract not recognized in the Reference.cs class? I think that if I can understand this, the rest will be decided by myself.

Thanks for any ideas.

+5
source share
1 answer

Is the second listing a reference to any operations on a service contract? WCF will only add to metadata types that are part of the contract.

+6
source

All Articles