Octo pack exclude folder

(Robdixon) #1

We are using the OctopusPack@4 inbuilt task in azure devops on a particular vs project.
The resulting nupkg file contains some folders with .cs source files in them.
Is there anyway to exclude these folders from the nupkg using octo pack?

(Tina) #3

Hi Rob,
Thanks for getting in touch. Would you be available for a quick zoom screen share?

Thank you,
Tina

(Tina) #4

Hi Rob,

In the build task for your application setting the MSBuild Arguments parameter to /p:OutDir=$(build.stagingdirectory) will publish compiled components to a folder in the staging directory. This will allow you to package only compiled code instead of the source.

You can always include files by expanding the Advanced Options of the Package task and use the Additional Arguments section to specify which files to include. The --include argument can be specified more than once.

I hope this helps.

Kind Regards,
Tina