BuildDependency::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, AddIn addin) { try { // 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) MessageBox.Show(bldDependency.DTE.Name); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
Show: