Currently, I have a C++/CLI wrapper project which references some OpenCV dlls. The wrapper project is then referenced by a C# library project I created.
Using Costura, the wrapper gets correctly merged within my C# library but the OpenCV dlls are not getting merged (because they're not referenced directly by my C# proj with copy local set to true).
I put all of the OpenCV assemblies into a costura64
folder located in the root of my project and added the Unmanaged64Assemblies
element with all the required OpenCV dlls listed into the weavers xml to no avail.
I also added the IncludeAssemblies
element to the Weavers xml with all of the required OpenCV dlls which causes an error while building:
MSBUILD : error : Fody/Costura: Assembly 'Imaging' cannot be found (not even as CopyLocal='false'), please update the configuration
My Weavers XML looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
<Costura>
<IncludeAssemblies>
Imaging
msvcp100d
msvcp110d
msvcr100d
opencv_core247
opencv_core247d
opencv_highgui247
opencv_highgui247d
opencv_imgproc247
opencv_imgproc247d
PvAPI
</IncludeAssemblies>
<Unmanaged64Assemblies>
Imaging
msvcp100d
msvcp110d
msvcr100d
opencv_core247
opencv_core247d
opencv_highgui247
opencv_highgui247d
opencv_imgproc247
opencv_imgproc247d
PvAPI
</Unmanaged64Assemblies>
</Costura>
</Weavers>
All assemblies currently have a Build Action
of Embedded Resource
.
Any help with what I need to do to merge the OpenCV assemblies into my C# library project would be greatly appreciated.