BuildDependencies::DTE Property
Visual Studio 2015
Gets the top-level extensibility object.
Assembly: EnvDTE (in EnvDTE.dll)
In Visual Studio, the DTE object is the root of the automation model, which other object models often call "Application".
public void Example(DTE2 dte) { try { BuildDependencies bldDepends; BuildDependency bldDependency = null; // Get the BuildDependencies in open solution. bldDepends = dte.Solution.SolutionBuild.BuildDependencies; if (bldDepends.Count > 0) // assign the BuildDependency bldDependency = bldDepends.Item(bldDepends.Count); // Show the BuildDependency returned by the Item property. MessageBox.Show(bldDependency.Project.Name); // Show the BuildDependencies top-level object. MessageBox.Show(bldDepends.DTE.Name); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
Show: