Shishkin Pavel
Shishkin Pavel

Reputation: 351

c++\cli project dependent c++ dll not copied to c# output directory

I have c++ native dll, lib and headers file. After I reference lib from c++\cli project, it builds successfully, but since c++\cli project - just a wrapper, I reference it in c# project and no native dll appears in c# project output directory after build. How can I fix it? I would not like to use build event to copy dll`s manually.

Upvotes: 1

Views: 2019

Answers (1)

Shishkin Pavel
Shishkin Pavel

Reputation: 351

Thus, I have found only two possible solutions:

  • post-build event in wrapper library, that copies native dll to all c# projects that require it
  • add native dll in c# projects directly and set build action to "Copy to output directory" (in accordance with the Lucas response)

Upvotes: 3

Related Questions