I have a one-time WPF application that uses an unmanaged dll.
When debugging locally, I just copied the dll to the debug / bin folder.
How to include a DLL in a project (VS2010) so that it is deployed and accessible for the application?
I tried to add it as a resource and install “Content” and “Always Copy”, and the file seems to be present in the installation / deployment files, however the application cannot see it.
If this helps, this is an example of the code that I use to access methods in an unmanaged DLL.
[DllImport("ODBC_VER_DETECT.dll")] extern private static long GetCompanyFileVersion([MarshalAs(UnmanagedType.LPStr)] String sDataBase, [MarshalAs(UnmanagedType.LPStr)] StringBuilder sVersion);
source share