Compartilhar via


Dependency Groups

A dependency group is a set of components upon which any component can specify either include dependencies or build order dependencies. This allows for flexible, indirect relationships between components, more complex inclusion requirements, and more efficient component authoring.

Like other groups, a dependency group exists as an independent object in the database and membership in the group can be declared by components at any time. This allows the group to exist and a component to express dependencies on it, even before the components within the group have been fully authored. Similarly, if one of many different components can satisfy the dependency of a component, for example if a network protocol component requires a network binding component, and any one will do, you can set a dependency on the network binding dependency group and then any component in that group can satisfy the requirement, including network binding components added to the group in the future.

Dependency groups can be used to ensure mutual-exclusion of components as well as the exclusion of certain combinations of components. They allow components to be included or excluded en masse. They also provide for greater efficiency in setting up build order dependencies, allowing components to require being built before or after all members of a group.

When a component expresses an include dependency on a group, the dependency states the number of components that it requires from that group. This number is referred to as the dependency type, and each dependency group has a default type which is used if the dependency does not explicitly state a type.

The following table shows the different dependency types.

Dependency type Result
Requires zero or one component from the group At most, one of the components from the group is allowed in the configuration.
Requires exactly one component from the group One and only one component from the group must be in the configuration.
Requires one or more components from the group At least one component from the group must be in the configuration.
Requires all components from the group All the components from the group must be in the configuration.
Conflicts with all components from the group None of the components from the group is allowed in the configuration.

Dependency groups are defined with Component Designer and membership in the group is declared by the members. Components can have membership in any number of dependency groups.

See Also

Groups | Dependencies

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.