0

I'm trying to compose a NuGet package containing my assembly and it's required data files.

What I would like to happen is when the parent project referencing my NuGet package is built, the data files from my package are copied to the output directory of the parent project.

This sounds straight forward but if I flag the data files as content in my package project they're just added to the parent project on install but not automatically copied on build.

I would like to do this with a custom .targets file in my package if possible.

2

1 Answer 1

1

I guess this is answered here

From my experience you can do this only with install.ps1. Modify these files tags - add a <CopyToOutputDirectory>Always</CopyToOutputDirectory> child

You can do it either with plain XML either with NugetPowerTools

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.