Version

Dependencies Property

Returns a collection of TaskDependency objects which define the tasks on which this task is dependent, as well as the nature of the dependency.
Syntax
'Declaration
 
Public ReadOnly Property Dependencies As TaskDependenciesCollection
public TaskDependenciesCollection Dependencies {get;}
Exceptions
ExceptionDescription
TaskDependencyExceptionThrown when a task is added to its own Dependencies collection.
TaskDependencyExceptionThrown when a task is added to the Dependencies collection of an ancestor or descendant task.
TaskDependencyExceptionThrown when adding a task to a Dependencies collection would create a circular dependency.
Remarks

A task cannot be added to its own Dependencies collection; doing so causes a TaskDependencyException to be thrown.

A task cannot be added to the Dependencies collection of an ancestor or descendant task; doing so causes a TaskDependencyException to be thrown.

A task that is a member of another task's Dependencies collection cannot contain that task in its Dependencies collection as this would create a circular dependency; attempting to create such a dependency TaskDependencyException to be thrown.

The contents of the Dependencies collection determines the "resolved" start date/time for the task, unless the task also has a constraint which supercedes the date as determined by the dependency. Each member of the Dependencies collection is referred to as a "predecessor" of the task. While the Dependencies collection can contain more than one member, thus linking the dependent task to multiple predecessors, only the member which makes the dependent task start the latest directly affects that task's start. A dependency can push a dependent task's start date/time forward or backward along the timeline, but in the case where a constraint is defined and honoring the dependency would cause a conflict with the constraint, the constraint supercedes the dependency. The TaskConstraintViolation event is fired at the time the dependency is set when the dependency would cause a conflict with the constraint; listeners of the event can opt to keep the dependency, but the dependency never overrides the task's start as determined by the constraint.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also