Configuration.Properties Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of all properties that pertain to the Configuration object.
public:
property EnvDTE::Properties ^ Properties { EnvDTE::Properties ^ get(); };
[System.Runtime.InteropServices.DispId(7)]
public EnvDTE.Properties Properties { [System.Runtime.InteropServices.DispId(7)] get; }
[<System.Runtime.InteropServices.DispId(7)>]
[<get: System.Runtime.InteropServices.DispId(7)>]
member this.Properties : EnvDTE.Properties
Public ReadOnly Property Properties As Properties
Property Value
A Properties collection.
- Attributes
Examples
public void CodeExample(DTE2 dte, AddIn addin)
{ // Make sure you have a solution loaded into Visual Studio
// before running the following example.
try
{
Project prj;
Configuration config;
OutputGroups outPGs;
Properties props;
if (dte.Solution.Projects.Count > 0)
{
prj = dte.Solution.Projects.Item(1);
config = prj.ConfigurationManager.ActiveConfiguration;
// Return a collection of OutputGroup objects that contain
// the names of files that are outputs for the project.
outPGs = config.OutputGroups;
MessageBox.Show(outPGs.Count.ToString());
// Returns the project for the config.
MessageBox.Show(((Project)config.Owner).Name);
// Returning the platform name for the Configuration.
MessageBox.Show(config.PlatformName);
// Returning all properties for Configuration object.
props = config.Properties;
string p = "";
foreach (Property prop in props)
{
p = p + prop.Name + "\n";
}
MessageBox.Show(p);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Remarks
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.