Is there any option to change application setting such as a <name,value,scope>triplet(which appear when u open project properties in VSTS) from command prompt so that while building the project,it is reflected in my settings?
I have not seen this option anywhere but I can think of a couple possible word-arounds:
Create multiple app.config files (e.g. one for each situation) and name them accordingly (e.g. dev.app.config, test.app.config, prod.app.config, etc.). Then, in your build, copy the appropriate configuration file to its respective destination renaming it along the way. You can use the "Copy" build task to copy a file to a location with a new name. For example, here's one for a web.config file:
The above "Copy" task will copy the "Test.Web.config" file and rename it to "web.config".
Another option would be to create a custom task that takes the location of the config file and the <name, value, scope> triplet and updates the config file for you. I haven't done this but I don't think it would be too difficult. This custom task may already exist, and if so, you'd be able to implement it fairly quickly. I'll take a look around tonight and if I can't find one I'll try to go ahead and create one and post back to this forum.
Monday, April 23, 2007 6:04 PM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.