I have Tuples working nicely with .NET 4.0 and WCF (reminder: you need .NET 4.0 for Tuple support).
Here is the unit test method (which calls the method via the WCF layer):
/// <summary>
/// Test Tuples
/// </summary>
[TestMethod()]
public void WcfTestTupleUnit()
{
Tuple<double, double> x;
x=CallViaWCF.testTuple();
Assert.AreEqual(x.Item1, 42);
Assert.AreEqual(x.Item2, 43);
}
#endregion
Here is the interface:
[OperationContract]
Tuple<double, double> testTuple();
Here is the implementation:
public Tuple<double, double> testTuple()
{
return new Tuple<double, double>(42, 43);
}
I just tested it by debugging using a "WCF Service Application" (see New..Project), which serves the WCF service. I use this method for debugging, as I can use the debugger to step seamlessly from the WCF client into the WCF service , and back again, which is quite useful at times.
I've also just tested this method by deploying it to both a console app, and a service app, so its definitely working for me.