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.10.1
Syntax
public TaskDefinition NewTaskFromFile(
	string xmlFile
)
Request Example View Source

Parameters

xmlFile
Type: SystemString
The XML file to use as input.

Return Value

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