Click or drag to resize
Task Scheduler Managed Class Library

TaskServiceNewTaskFromFile Method

Returns a TaskDefinition populated with the properties defined in an XML file.

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.12.0
Syntax
C#
public TaskDefinition NewTaskFromFile(
	string xmlFile
)
Request Example View Source

Parameters

xmlFile  String
The XML file to use as input.

Return Value

TaskDefinition
A TaskDefinition instance.
Exceptions
ExceptionCondition
NotV1SupportedExceptionImporting from an XML file is only supported under Task Scheduler 2.0.
See Also