I have a project in TeamCity that pulls in a VS2013 project, builds it and then packs it wil OctoPack (setting Run OctoPack is enabled in the build step).
Now the creation of the nuget package works fine, it is pushed in the nuget feed and octpack creates a release for me, this all works.
But when I look in the nuget file I see that there is only 1 web.config transform file, I have about 10 web.config transforms files, each for a separate release.
How can I make sure OctoPack packs all the transformation files so it can make multiple releases from a single buid?
Yep this worked for me too, but now I have the issue that I have all the transform files in all the environments. Meaning the prod. transform file is in the dev. deployment and so on (the regular web.config is transformed correct but the transform files are still there)
Meaning that the prod. information can be found on the dev and test server which is not a good idea security wise.
If you want to make this even more stable, you could create a project variable called “TransformFile” per environment which has the name of your transform file (see attached screenshot). Then in your Pre-deployment script you could do something like Remove-Item *transform.config -exclude $TransformFile to delete all the transform files except the one that belongs to the current environment.