Octopus deployment and nested folders issue


I have an asp.net web app in tfs. The path in TFS is as follows:


However, when the code is deployed by Octopus, it deploys samplecode/samplecode2/samplecode2 to the IIS site, whereas I just want the files in the folder samplecode2.

Is there a way to do this?



Thanks for getting in touch! When Octopus deploys and extracts your package, it will keep the same directory structure as it existed when you initially package it up. While you can use a postdeploy script to move your files after extraction, I would instead recommend packaging it a bit differently - to ensure the structure you’re expecting after it gets deployed matches the structure when packaging it. We have great documentation covering TFS integration which may help in your scenario.

Let me know if this helps and if you have any further questions. :slight_smile:

Kind regards,