views:

61

answers:

0

I have an assembly built that uses appSettings in the app.config...pretty straight forward. however, I'm referencing this assembly in a web service, and that web service contains the nAnt build file for this service plus being the entry point for everything. Ideally I'd like to be able to set the assembly's appConfig values from the build file, but is this possible? Or do I have to switch to using the Settings values of the assembly and do something like this in the build:

<xmlpoke file="${PublishLocation}\web.config" xpath="//applicationSettings/Namespace.AssemblyClass.Properties.Settings/setting[@name='ExchangeServer']/value" value="${ServerName}" />

You get the idea. Is this possible with just a config? My ideal situation would be to keep the settings more flexible in the appConfig so that when everything is on the server, if frogs rain down, I can update the assembly's config values without rebuilding the solution.

Is this even possible (the xpath is wrong, it's just an example of what I'd like to do):

<xmlpoke file="${PublishLocation}\web.config" xpath="//appSettings/Namespace/AssemblyClass/add[@key = 'ExchangeServer']/@value" value="${a}" />