I'm working on a C# WinForms project currently being developed in VS 2017, although, it will be deployed on a Linux machine with Ubuntu 16.04 LTS using the Mono framework (MonoRuntime
).
I'm referencing EmguCV v3.2
and SQLite
in my project. Both of these are .NET Managed Assemblies with dependencies on their own native libraries (EmguCV
uses cvextern.dll
and SQLite
uses SQLite.Interop.dll
).
Since this app will be deployed on a Linux machine, I've compiled and built the .so
library files for both of them (libcvextern.so
and libSQLite.Interop.so
to be precise) successfully.
For my application to work on Windows, the 2 .so
files are redundant, whereas they are necessary for when my app runs on Linux under Mono (and they must be in the executing directory always!).
My question is, I want to make Visual Studio 2017 or MonoDevelop understand that If I'm building on Windows (either Debug/Release) I need the .dll
files to be copied to Output directory (OR) similar with .so
files if on Linux. How do you approach this?
So, How do I set a Post-Build event properly that is respected by both VS 2017 and MonoDevelop that they identify the underlying current operating system at build time and copy respective lib files to the output directory?
Apologies for any English grammar issues, I'm a non-native.
Any pointers are appreciated!