SolutionBuild.ActiveConfiguration Property
Gets the currently active SolutionConfiguration object.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property ActiveConfiguration As SolutionConfiguration
SolutionConfiguration ActiveConfiguration { get; }
property SolutionConfiguration^ ActiveConfiguration {
SolutionConfiguration^ get ();
}
abstract ActiveConfiguration : SolutionConfiguration
function get ActiveConfiguration () : SolutionConfiguration
Property Value
Type: EnvDTE.SolutionConfiguration
A SolutionConfiguration object.
Remarks
The SolutionConfiguration object represents the current solution configuration that will be used if a solution build operation occurs.
Examples
public void CodeExample(DTE2 dte)
{
try
{
SolutionBuild sb = dte.Solution.SolutionBuild;
SolutionConfiguration sc = sb.ActiveConfiguration;
vsBuildState vsBS;
string msg = "Return relative path to startup projects: ";
foreach (String s in (Array)sb.StartupProjects)
{
msg += "\n " + s;
}
msg += "\nSolutionConfiguration: " + sc.Name;
vsBS = sb.BuildState;
if (vsBS == vsBuildState.vsBuildStateDone)
msg += "\nA build has occurred.";
else if (vsBS == vsBuildState.vsBuildStateInProgress)
msg += "\nA build is in progress.";
else msg += "\nA build has not occurred.";
MessageBox.Show(msg);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.