Additional transforms in deploy step not working

I have managed to create two apparently identical projects where “Additional transforms” (Web.Development.config => web.config) are working in one, but not the other.

In boyh cases octopus claims to execute the transform:
---- From log start ------
Apply Web.Development.config
Transforming ‘…\Web.config’.
---- From log end —

I am deploying the same nuget package in both and deploying to the same server. Even in the RavenDB the projects are, as far as I can see, equally set up.

Found the bastard! Additional transforms was actually doing what it was supposed to do. We had an additional legacy script which overwrote the correctly transformed config from Octopus.

The bug was in our code.