Projects::Properties Property
Visual Studio 2015
Gets a collection of all properties that pertain to the Projects collection.
Assembly: EnvDTE (in EnvDTE.dll)
Some properties are exposed as automation properties on the Solution object or from objects you get to through the solution, such as SolutionBuild object for build dependencies.
public void CodeExample(DTE2 dte) { try { // Open a project before running this sample Projects prjs = dte.Solution.Projects; string msg = "There are " + prjs.Count.ToString() + " projects in this collection."; msg += "\nThe application containing this Projects collection: " + prjs.DTE.Name; msg += "\nThe parent object of the Projects collection: " + prjs.Parent.Name; msg += "\nThe GUID representing the Projects type: " + prjs.Kind; if (prjs.Properties != null) { msg += "\nProperties:"; foreach (Property prop in prjs.Properties) { msg += "\n " + prop.Name; } } MessageBox.Show(msg, "Projects Collection"); } catch(Exception ex) { MessageBox.Show(ex.Message); } }
Show: