Web.Config transformations injecting ‘ReplacableToken’ for connection string
Oh MSBuild, you so crazy. By default MSBuild will not replace connection strings when running Web.Config transformations. The thinking behind this is that if you miss a replacement value out of a Debug config you can’t deploy to a dev server with a release connection string in your Web.Config (from a previous transformation, I guess).
Personally I don’t think this makes sense anyway, but oh well. MSBuild will drop your actual connection string into a SetParameters.xml file in your obj\{Config}\Package directory. You can force MSBuild to transform connection strings through a (massive) MSBuild parameter.
At the command line:
msbuild MyApp.sln /p:AutoParameterizationWebConfigConnectionStrings=false
More at StackOverflow
Leave a comment