Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 6734 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 2430 [details]
Please note the file has been highly modified for my application.
Specifying a KnownType attribute on a WCF method that is synchronous will not work. This is due to the BaseMessageFormatter not copying the known types from the OperationDescription. When you try and run the client it will fail as it is not able to serialize the known type. Here is the fix which should be made to the BaseMessagesFormatter in the constructor. Previously if SyncMethod was not null it would return before copying the known types.
public BaseMessagesFormatter (OperationDescription desc)
: this (desc.Messages)
if (desc.SyncMethod != null)
isAsync = false;
requestMethodParams = replyMethodParams = desc.SyncMethod.GetParameters();
isAsync = true;
ParameterInfo methodParams = desc.BeginMethod.GetParameters();
requestMethodParams = new ParameterInfo[methodParams.Length - 2];
Array.Copy(methodParams, requestMethodParams, requestMethodParams.Length);
methodParams = desc.EndMethod.GetParameters();
replyMethodParams = new ParameterInfo[methodParams.Length - 1];
Array.Copy(methodParams, replyMethodParams, replyMethodParams.Length);
//Add the known types for serialization.
What did you do to work around this?
Seems like the fix is provided so why not implement?