Additional files with octopack

Hi,

Is it possible to get octopack to use a nuspec files but also add the files automatically?

I have two folders that are not in the project.csproj that I want to include in with octopack.

Hi Tore,

At the moment you can’t use both, but you can use wildcards when you specify a custom <files> element, so it doesn’t take too many lines to reproduce what OctoPack is doing. We do have an open issue to revisit whether we can do this or not.

This page has an example on using the wildcards:

Thanks,

Paul

This is possible nowadays right(?) If you have a NuSpec file with -section and specify /p:OctoPackEnforceAddingFiles=True, you will end up with a package that contains all the files OcgtoPack would normally add AND the ones you’ve specified in the -section. This is awesome, but lets say you have a solution with several projects being packaged and you (or your CI) builds using .sln and you dont want the EnforceAddingFiles for all projects, then you could set the property in you .csproj right before the <import …octopack… />-section:

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

This will include the default files for the particular project when building the .sln-file even though you do not specify the parameter on the command line.