I have a large class with many features open as a WCF service, which also has mex endpiont. Now, when I try to add a link to this service in Visual Studio 2010, I get the following error:

Is there anything I can do other than reduce the number of methods so that this error disappears?
Here is the code I use for the mex endpoint:
ServiceMetadataBehavior smb = svh.Description.Behaviors.Find<ServiceMetadataBehavior>();
if (smb == null)
smb = new ServiceMetadataBehavior();
smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15;
svh.Description.Behaviors.Add(smb);
svh.AddServiceEndpoint(
ServiceMetadataBehavior.MexContractName,
MetadataExchangeBindings.CreateMexTcpBinding(),
location+"/mex"
);
source
share