This project is read-only.

value="<!-- SQLSERVER not defined -->"/>

Jan 4, 2010 at 4:20 PM
Edited Jan 4, 2010 at 4:33 PM

I'm not understanding why my substitution is not working.

I've tried two commands:

xmlpreprocess.exe /x:"c:\Source\TFBIC.RCT.BizTalk\TFBIC.RCT.BizTalk.Deployment\EnvironmentSettings\SettingsFileGenerator.xml"
/i:"web.config" /o:"web2.config" /settingNameCol:3

xmlpreprocess.exe /s:"c:\Source\TFBIC.RCT.BizTalk\TFBIC.RCT.BizTalk.Deployment\EnvironmentSettings\SettingsFileGenerator.xml"
/i:"web.config" /o:"web2.config" /settingNameCol:3

   This first always prompts for the environment column.  My input file is the same as the ones used by the BizTalk Deployment Framework.  I'm tryign to use column 3 for the Production values.

My input: web.config:

<!-- #ifdef _xml_preprocess -->
                <!-- <add key="testConfiguration" value="${SQLSERVER}"/> -->
  <!-- #else -->
                <add key="testConfiguration" value="(local)"/>
  <!-- #endif -->

My output: web.config:

<!-- #ifdef _xml_preprocess -->
                <!-- <add key="testConfiguration" value="${SQLSERVER}"/> -->
  <!-- #else -->
                <add key="testConfiguration" value="<!-- SQLSERVER not defined -->"/>
  <!-- #endif -->

Part of my SettingsFileGenerator.xml (edited with Excel) but shown here in the XML:

<Row>
    <Cell ss:StyleID="s74"><Data ss:Type="String">SQLSERVER</Data></Cell>
    <Cell ss:StyleID="s76"><Data ss:Type="String">(local)</Data></Cell>
    <Cell ss:StyleID="s76"/>
    <Cell ss:StyleID="s76"><Data ss:Type="String">QAServer\QAInstance</Data></Cell>
    <Cell ss:StyleID="s76"/>
    <Cell ss:StyleID="s76"><Data ss:Type="String">ProdServer\ProdInstance</Data></Cell>
   </Row>

Any ideas?  Also shouldn't the ifdef statements disappear in the output file?

Is it a two-pass affair?  Do I have to process my SettingsFileGenerator.xml to a QA.xml, then use the QA.xml in the above?

Neal

Jan 4, 2010 at 6:58 PM

I finally came across the proper combination of parms:

xmlpreprocess.exe /x:"c:\Source\TFBIC.RCT.BizTalk\TFBIC.RCT.BizTalk.Deployment\EnvironmentSettings\SettingsFileGenerator.xml"
/i:"web.config" /o:"web2.config" /e:QA /v

Neal