Search code examples
octopus-deploy

Octopack: Additional files copied in a pre-build event


I am trying to get Octopack to include some additional dll's that are not part of my Visual Studio project.

Is there a way to get Octopack to use my csproj files (as normal) and then specify just the additional files I need, rather than using the section in the nuspec. (Because then I have to maintain a list of all project files in my nuspec)

I am currently copying some shared libraries to a folder "/providers" in a pre-build event. Is there a way to extend on this to copy them somewhere that Octopack will see and package them?


Solution

  • You don't need to maintain a list of all your project files in your nuspec file, you can do this:

    <files>
        <file src="MyProject.Website\**\*.*" target="" />
    </files>
    

    This will grab everything in your project (all files and sub directories). If that's too much for you, you can take advantage of exclusion rules:

    <files>
        <file src="MyProject.Website\**\*.*" target="" exclude="MyProject.Website\docs\admin.txt" />
    </files>
    

    Hope that helps.