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

前端 未结 4 1284
别那么骄傲
别那么骄傲 2020-12-02 16:57

One solution (the.sln)

One C++ project (mycppproject.vcxproj in 2010or mycppproject.vcproj in 2008) which compiles a native DLL exporting some function(s). In debug

4条回答
  •  星月不相逢
    2020-12-02 17:27

    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.

提交回复
热议问题