My Workaround app for WCF, applicationSettings etc

Sorry if this isn’t the proper place to post this, but I don’t see any other kind of general discussion area.

I have many WCF end points that need to be updated per environment as well as some other settings that aren’t in appSettings or ConnectionStrings. I see that there are some stories on the Trello board for enhancements but I wanted a more generic token replacement system that didn’t care about the format of the file.

I created a very basic console application that uses the values in it’s app config to replace token values in any text file. Octopus will replace any instances of any appSetting entries within the .config of this tool when it is included in the nuget package. I use this as a way to bridge those settings to form a generic token replacement.

So I include this application, it’s config and a tokenized version of the endpoints.config in the package, when it is deployed I invoke the application within the PostDeploy.ps1 and copy the output to the deployed directory.

&$pwd\XXX\TokenReplace.exe $pwd\XXX\endpoints.template.config $pwd\XXX\endpoints.config

Copy-Item $pwd\XXX\endpoints.config $pwd\XXX\Website\bin

If you want to use it, you can get it at


Very cool! I’ll be sure to point anyone else at this if they need a more advanced replacement system.