Bertrand Marron
Bertrand Marron

Reputation: 22210

Add a postbuild event in a nuget package

I am creating a nuget package and I want it to add a post-build event to my project that will copy some dll files to its target directory.

Is such a thing possible? If so, how would I do it?

Or is there a way to, somehow, embed unmanaged dll's (native C++) in my nuget package and have them copied upon build to the target directory?

Upvotes: 3

Views: 855

Answers (1)

Bertrand Marron
Bertrand Marron

Reputation: 22210

Well, I kinda figured it out by putting the unmanaged dll's in a Dependencies folder that I put inside the content directory of the nuget package.

Then my build/deploy process depends on that Dependencies folder. (Copy to output directory)

Upvotes: 1

Related Questions