C++/CLI DLL namespace not found in MSVS

假装没事ソ 提交于 2019-12-20 04:36:06

问题


The big picture: what I am trying to accomplish is writing code in both C# and C++, to strike a good performance/productivity balance. It is not for code reuse reasons; I just want to be able to write new code in native C++ when it suits me, without committing to all its horrors.

I have a solution with 4 projects:

  • GUI: C# WPF interface
  • Logic_Cs: C# DLL, high level reference implementation of game logic
  • Logic_CLI: CLI DLL, interface between managed and unmanaged code
  • Logic_Cpp: C++ lib with native implementation

At some point, all of this was working just fine. In my GUI project I could switch between C#/C++ implementation merely by using the namespace from the appropriate DLL.

Then I apparently changed something, and now I can not get the namespace in the Logic_CLI project to be recognized in the GUI project, even though the Logic_Cs namespace still works just fine.

Yes, I added correct references, set dependencies, rebuilt AND recreated my entire solution structure from scratch; nothing helps.

I notice the C# DLL builds to a folder in its own project directory, while CLI builds to the solution directory; but the GUI application seems to look for the DLL's in their correct directory anyway, and im not getting any complaints about the DLL; it just refuses to import the namespace from it.

Earlier, when all this was working, I wasnt explicitly exporting anything from the CLI DLL; nor am I doing so for the C# DLL. It should 'just work', no?

来源:https://stackoverflow.com/questions/4659888/c-cli-dll-namespace-not-found-in-msvs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!