简体   繁体   中英

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.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM