How do I place files in the root of a package when using OctoPack?

When I create a nupkg file using OctoPack (without a custom nuspec file), it usually generates a folder structure similar to the following


However, I would like to include files under the bin\published folder into the package.
So, I wrote the following nuspec file.

<?xml version="1.0"?>
<package xmlns="">
    <file src="bin/publish/**/*" target=""/>

Then, the structure of the nupkg file will look like this.


How can I place the files under the bin/publish folder directly into the package root, without creating a bin/publish folder in the package, as in the example at the beginning?

Note that in the future I will try to use octo.exe for packaging instead of OctoPack, but for now I can’t start with that.


Hi @aetos,

Thanks for reaching out to Octopus.

Your syntax does look correct for copying files to the root of the package. I am wondering if you have tried backslash \ instead of a forwardslash / to see if that changes the behavior? IE <file src="bin\publish\**\*" target=""/>. I am seeing an external thread here that suggests paths are sometimes treated differently depending on slashes and wildcards.

Please let me know if that helps you get unstuck.