How do I add a reference to an unmanaged C++ project called by a C# project?

You cannot add a reference to an unmanaged DLL.

Instead, you should make a post-build task to copy the file.

Alternatively, you can add a link to the unmanaged DLL as a file in the C# project, and set Build Action to None and Copy to Output Directory to Copy If Newer.

Leave a Comment