Octopack not picking selected files

Hello,

I’m using octopack to deploy all of my projects, and it works fine. I have two very similar projects which have the same set of dlls, in one octopack picks all of them, in the other it consistently ignores two.

All the settings are the same between two projects. Does anybody knows, what logic does octopack use to include files into package and how can I make it include all files in source directory?

Thank you,
Sergey

Hi Sergey,
Thanks for dropping us a line. I’m sorry to see you are having some problems packaging your application.
Octopack is actually an open source project so feel free to take a read through the code yourself here and see how the packaging process works.
Octopack will first look for a .nuspec file in the root of your project and if that does not exist it will then generate one for the purposes of NuGet package creation. It is this .nuspec file that defines what files are included in the package.

As outline in the documentation about including build event files, you can ensure that files that are not typically included in the compilation are included in the deployment package by including the <file> element to your nuspec file. Additionally, add the /p:OctoPackEnforceAddingFiles=true msbuild parameter to ensure that all files, both those from compilation and those specified in the .nuspec file are included.
If you are building off a build configuration file (or the csproj file itself), then you can instead set the OctoPackEnforceAddingFiles value through a ‘’ element, e.g.

<PropertyGroup>
 <OctoPackEnforceAddingFiles />True<OctoPackEnforceAddingFiles />
</PropertyGroup>

as outlined in this ticket.

Since you indicate that there is different behaviour I can only assume that there is some different configuration between the two projects. Could you confirm if there is any difference between your two .nuspec files and send them through so that we can take a look.
Further details about using Octopack can be found in our documentation here

Let me know if you need any further clarification on this process.
Cheers
Robert