Susantha Kumara wrote:
Hi Ian,
Thank a lot for the prompt reply.
How can I change the settings in my app.exe.config ?.
At the moment I have an app.exe.config which is copied as is to the
deployment folder by the nant script. And I will have to change this
file in the deployment folder manually before running the application.
well depending on what you are changing you could either use :
- the XmlPoke task which allows you to change single values in an xml
file or:
- <copy> with a filterchain - this allows you to do string substitution
in the destination file using specified tokens.
If the change to app.exe.config is a very simple one the first option is
probably a better one.
Ian
-----Original Message-----
From: Ian MacLean [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 02, 2005 1:13 PM
To: Susantha Kumara
Cc: nant-users@lists.sourceforge.net
Subject: Re: [Nant-users] Changing configuration files with nant
Susantha Kumara wrote:
Hi all,
I use nant to build a C# .Net application which is dependent on an
external set of .Net assemblies. Each new release of these set of
external assemblies has slightly different assembly names ( Ex :
mylib-0.8.335.dll --> mylib-0.8.347.dll ).
So at the moment I have to change the build.xml files manually to
reflect the assembly name changes (and some of the settings in the
app.config in the deployment as well ).
Is there any way that I could do this using nant by itself so that I
would change the new version number (or what ever the new suffix) in
one
place and all the build.xml files and any configuration files will be
changed automatically?
sure. Just define a property :
<property name="lib-version" value="0.8.335"/>
in some common file that you include in all the build files that need to
use those libraries and then reference them like :
mylib-${lib-version}.dll
Ian
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users