Export (0) Print
Expand All

_Solution.Properties Property

Gets a collection of all properties that pertain to the _Solution.

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

Properties Properties { get; }
/** @property */
Properties get_Properties ()

function get Properties () : Properties

Property Value

A Properties collection.

Some properties are exposed as automation properties on the _Solution or from objects you get to through the solution, such as SolutionBuild object for build dependencies.

public void PropertiesExample(DTE2 dte)
{
    // NOTE: This example requires a reference to the
    //       System.IO namespace.

    // Before running this example, open a solution.

    Properties props = dte.Solution.Properties;
    string msg = 
        Path.GetFileNameWithoutExtension(dte.Solution.FullName) + 
        " has the following properties:\n\n";

    foreach (Property prop in props)
    {
        msg += prop.Name + " = ";
        try
        {
            msg += prop.Value.ToString() + "\n";
        }
        catch
        {
            msg += "(Nothing)\n";
        }
    }

    MessageBox.Show(msg);
}

Community Additions

ADD
Show:
© 2014 Microsoft