On version 2.5.1.0. Followed service definition would get error
Type 'Microsoft.Win32.TaskScheduler.TaskDefinition' cannot be IXmlSerializable and have DataContractAttribute attribute.
Type 'Microsoft.Win32.TaskScheduler.TaskDefinition' cannot be IXmlSerializable and have DataContractAttribute attribute.
[ServiceContract]
public interface IService1
{
[OperationContract]
void DoWork();
[OperationContract]
TaskDefinition GetTask(); //this will fail
}
Reads TaskDefinition's attributes /// <summary>
/// Defines all the components of a task, such as the task settings, triggers, actions, and registration information.
/// </summary>
[XmlRootAttribute("Task", Namespace = TaskDefinition.tns, IsNullable = false)]
[XmlSchemaProvider("GetV1SchemaFile")]
[DataContract(Name = "Task", Namespace = TaskDefinition.tns)]
public sealed class TaskDefinition : IDisposable, IXmlSerializable