Octopack for a project that links to another project that has octopack

Hi

Have 2 project
Project A
Project B

Both use octopack
Project B also references Project A

What is happening is that the we have a Jenkins build building Project A - generating a nuget package being pushed to octopus
Then a different Jenkins job is building Project B
What should happen is Project B should have a nuget package build and pushed to octopus
What is happening is that octopack is generating nuget packages for both Project A and B in the Project B build and pushing both nuget packages to Octopus resulting in a package already exists error for Project A

How do we limit the Project B build to only generate a package for Project B despite it referencing Project A which also has Octopack

Hi Mohamed,

Thanks for getting in touch.

I’m not 100% sure I’m understanding your issue correctly, however it sounds to me like you need to exclude some files from packaging. I assume from the description that Project A is a library, and project B is an appliction that depends on that library?

My suggestion, if I’m understanding the issue correctly, would be to specify a “Do Not Copy” on the library files in the app project, as per this documentation. It will then include them in the build, but not push them to the output directory for packing.

Let me know if this is any help or if you think I’ve assessed the problem incorrectly.

Thanks

Jason

Hi

Both projects are apps.
There is an odd reason why a app is using another app - but it is for shared resources which cannot exist in a class library reasons.

Is there a why to only allow octopack to pack for a specific project and not all referenced projects that also have octopack

Hi Mohamed,

There is a section in the documentation on including specific files in Octopack. Of the three options. Having a read back through it, I’d be inclined to use the element in the custom nuspec option,as it points out that if you use that option, Octopack will not try to include any additional files. So that might work.

Thanks

Jason

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.