1

Closed

Some variables are not found in the xml file, thus the transformed xml file has comments of type "<!-- keyXXX not defined -->"

description

When trying to transform tha attached "web.config.deploy" file , using the attached "testingenvironment_config_settings.xml", some keys are converted but with the value of "key not defined", but those keys are present in the xml file.


The command line used is the following


Xmlpreprocess.exe /i Web.config.deploy /o Web.config /s testingenvironment_config_settings.xml

file attachments

Closed Jul 31, 2013 at 11:47 AM by lorenh
In 2.0.18 I have provided a version of the preprocessor executable that no longer requires /fixFalse to be passed.

comments

lorenh wrote Jul 27, 2013 at 4:06 PM

This is because of the way XmlPreprocess handles the word "false" by default. When you defined a value as "false", it actually has the effect of undefining the property unless you pass a switch to turn this behavior off.

(See documentation for the /fixfalse flag here https://xmlpreprocess.codeplex.com/wikipage?title=Command%20Line&referringTitle=Properties )

You have a couple options: 1) You can add the /f or /fixfalse switch, or 2) you can put quotes around the value "false" in your settings file.

ex:
<property name="CaptchaOn">"false"</property>
This has tripped up many people, but I never dared to change the default behavior for backward compatibility reasons. Perhaps someday I'll compile up and distribute two executables in the release, one with old behavior, and one with new behavior so people can choose which one they want to use.

Sorry for the confusion.

gabser wrote Jul 29, 2013 at 6:19 PM

Thank you very much, i have added "/fixFalse" in the command line arguments and the missing converted values now are being transformed with the correct values.

lorenh wrote Jul 31, 2013 at 11:46 AM

In 2.0.18 I have provided a version of the preprocessor executable that no longer requires /fixFalse to be passed.

wrote Jul 31, 2013 at 11:47 AM