on my WCF Service I just change an enum from:
/// <summary>
/// The DocumentState enum.
/// </summary>
[DataContract]
public enum DocumentState
{
/// <summary>
/// Undefined.
/// </summary>
[EnumMember]
Undefined,
/// <summary>
/// OK.
/// </summary>
[EnumMember]
Ok
}
to:
/// <summary>
/// The DocumentState enum.
/// </summary>
[DataContract]
[Flags]
public enum DocumentState
{
/// <summary>
/// Undefined.
/// </summary>
[EnumMember]
Undefined = 0,
/// <summary>
/// OK.
/// </summary>
[EnumMember]
Ok = 1
}
On the client side I update the WCF References without any Problems but after rebuild I get:
Error 5 Custom tool error: Failed to generate code for the service reference 'MyService'. Please check other error and warning messages for details
Whats wrong with this flag enum?
UPDATE:
Ok.. in the warrnings I found this but this doesn't really helps me:
Warning 1 Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Referenced type 'TestSolution.Test.Entities.Documents.Document, TestSolution.Test.Entities, Version=1.1.78.7965, Culture=neutral, PublicKeyToken=7ad0fddf5c57b9b3' with data contract name 'Document' in namespace 'http://schemas.datacontract.org/2004/07/TestSolution.Test.Entities.Documents' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IDocumentService'] c:\TFS1\TestSolution - Test\Test\Test.Core\Service References\DocumentService\Reference.svcmap 1 1 Test.Core Warning 2 Custom tool warning: Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IDocumentService'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='NetTcpEndpoint'] c:\TFS1\TestSolution - Test\Test\Test.Core\Service References\DocumentService\Reference.svcmap 1 1 Test.Core Warning 3 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='NetTcpEndpoint'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='DocumentService']/wsdl:port[@name='NetTcpEndpoint'] c:\TFS1\TestSolution - Test\Test\Test.Core\Service References\DocumentService\Reference.svcmap 1 1 Test.Core Error 4 Custom tool error: Failed to generate code for the service reference 'DocumentService'. Please check other error and warning messages for details. c:\TFS1\TestSolution - Test\Test\Test.Core\Service References\DocumentService\Reference.svcmap 1 1 Test.Core