Rodrigo,

Another option might be (if like us, you sometimes have "template" files),
to use NAnt to do token replacement based on configuration.

We have a task in a NAnt script which looks a bit like this

  <target name="_convert.DB.template">
    <copy file="${source}" tofile="${target}" overwrite="true">
      <filterchain>
        <replacetokens>
          <token key="KEYNAME" value="${property}" />
        </replacetokens>
      </filterchain>
    </copy>
  </target>


The file specified by the 'source' property is (in our case) actually a SQL
template for creating MSSQL databases, but there is no reason why it
couldn't be web.config - create a template, using tokens such as @KEYNAME@,
then in your build script, replace them as above - the file is output to
'target'.

If you aren't using NAnt, I'm sure alternatives are available in your chosen
build tool!


Cheers,

Matt Chatterley

2008/8/28 Ruben Willems <[EMAIL PROTECTED]>

> Hi
>
>
> if you can script the change (a simple .Net console program for example),
> you can use the exec task in the publisher section to call this program,
> and afterwards publish as you do now.
>
>
> with kind regards
> Ruben Willems
>
>
>
> On Thu, Aug 28, 2008 at 5:32 AM, Rodrigo Juarez <[EMAIL PROTECTED]>wrote:
>
>>
>> Hi
>> I have configured cc.net for a small website, and I need to change
>> some value inside a web.config file before publish
>> How can I do that?
>>
>> Thanks In Advance
>>
>> Rodrigo Juarez
>>
>
>

Reply via email to