K
Kevin McNeish [C# MVP]
Does anyone know how to set the project constants property for "All
Configurations" programmatically?
The following code does this by setting each project individually:
foreach (EnvDTE.Configuration config in proj.ConfigurationManager)
{
if
(!mmString.Empty(config.Properties.Item("DefineConstants").Value.ToString())
)
{
// Add a semicolon separator if the DefineConstants property
isn't empty
config.Properties.Item("DefineConstants").Value += ";";
}
config.Properties.Item("DefineConstants").Value += constants;
}
Instead of doing this, I want to set it once for "All Configurations" as I
can do manually through the IDE.
Configurations" programmatically?
The following code does this by setting each project individually:
foreach (EnvDTE.Configuration config in proj.ConfigurationManager)
{
if
(!mmString.Empty(config.Properties.Item("DefineConstants").Value.ToString())
)
{
// Add a semicolon separator if the DefineConstants property
isn't empty
config.Properties.Item("DefineConstants").Value += ";";
}
config.Properties.Item("DefineConstants").Value += constants;
}
Instead of doing this, I want to set it once for "All Configurations" as I
can do manually through the IDE.