Dec 31, 2009 at 4:50 PM
Edited Jan 4, 2010 at 2:30 PM
|
I read this info:
Integration with Visual Studio Setup Projects
Add a custom page with two text boxes to the installer's UI to collect the settings file name into a property named SETTINGSFILE, and optionally additional custom properties into a property named CUSTOMSETTINGS
Add the XmlPreprocess.exe file to the installer
Add a custom action that invokes XmlPreprocess.exe with the appropriate command line parameters, for example:
/s "[SETTINGSFILE]" /i "[TARGETDIR]web.config" [CUSTOMSETTINGS]
Question(s):
1) Wouldn't the user also have to indicate which column to use from the SettingsFile? I.e. Dev, QA, Prod?
I currently have a install dialog box with four radio buttons representing the four enviornments.
I was trying to figure this out on my own, would this work:
/s "[SETTINGSFILE]" /i "[TARGETDIR]web.config" /settingNameCol: [ENVIRONMENTBUTTON] [CUSTOMSETTINGS]
where ENVIRONMENTBUTTON is the name of my radio button(s). I'll give it a try and see.
I added a custom actionunder "Install", and set the argument property to this:
/s "[SETTINGSFILE]" /i "[TARGETDIR]web.config" /settingNameCol: [ENVIRONMENTBUTTON] [CUSTOMSETTINGS]
When I run the MSI, I get this error:
Error 1001: Error encountered preprocessing --> Value cannot be null. Parameter name: path
This was finally solved by setting the property "Condition" to True.
The next hitch was that the /settingNameCol has to be a number, so I will change values of my buttons.
I decided to test from command line until I saw the substitution working, so created a test.cmd with this contents:
xmlpreprocess.exe /s "c:\Source\TFBIC.RCT.BizTalk\TFBIC.RCT.BizTalk.Deployment\EnvironmentSettings\SettingsFileGenerator.xml" /i "web.config" /settingNameCol:3
Still testing ... time to break for the end of 2009.
Thanks,
Neal Walters
|