By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,282 Members | 1,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,282 IT Pros & Developers. It's quick & easy.

Setting Project constants for all configurations

P: n/a
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("DefineCon stants").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.

--
Thanks!
Kevin McNeish
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Kevin,

Thanks for posting. I am currently doing research on this issue and I will
get back to you as soon as possible.

Have a nice day!

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2

P: n/a
Hi Kevin,

I am not able to find a better way to achieve this goal as well. The
ConfigurationManager property of the Project only holds separate
configurations. I guess that when we set the properties for "All
Configurations" or "Multiplpe Configurations" within VS.Net IDE, the IDE
achieves the goal by enumearting separate configurations as well.

I hope this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.