We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

BuildDependency.Collection Property

Returns the BuildDependencies collection containing the BuildDependency object that supports this property.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

BuildDependencies Collection { get; }

Property Value

Type: EnvDTE.BuildDependencies
A BuildDependencies collection.

public void Example(DTE2 dte, AddIn addin)
      // Make sure there is at least one BuildDependency in your
      // solution to run this code.
      BuildDependencies bldDepends;
      BuildDependency bldDependency = null;

      bldDepends = dte.Solution.SolutionBuild.BuildDependencies;
      if (bldDepends.Count > 0)
         bldDependency = bldDepends.Item(bldDepends.Count);

      if (bldDependency.Collection.Count > 0)
   catch (Exception ex)