I have a solution consisting of a number of projects, including:
Foo.Bar.Client
Foo.Common
Foo.Bar.Client
depends on components in Foo.Common
. And, Foo.Common
does not have its own config file; its settings are stored in the config file of the client app using it, in this case Foo.Bar.Client
.
Thus, the config file for Foo.Bar.Client
contains
<configSections>
<section name="BletchConfiguration"
type="Foo.Common.Bletch, Version=1.1.0.0, ..."/>
....
</configSections>
I've been tasked with tweaking our version numbering so that the "revision" portion corresponds to the latest change-set (in our case the HEAD revision number, as we're using Subversion), e.g. from "1.1.0.0" to "1.1.0.12345".
So I've implemented a "shared" assembly-version-info module as described here. And I've modified our NAnt build script to grab the version number and update the shared assembly-info file.
I had not, however, counted on version numbers being embedded in the config file(s). Is there a (relatively) painless way to automate updating the version numbers in the config files?
Obviously, I can split the "common" assembly into a separate solution.
I could also configure the common components using IoC, which would eliminate the need for an assembly-specific config section.
However, either of these approaches involve some risk and time ... both of which I believe the powers-that-be would prefer to avoid if possible (at least for right now).