如何在同一解决方案中从 C++/CLi 项目引用 C# 项目
我的解决方案中有两个项目,一个是 C# 库,另一个是 C++/CLI 库。
我已使用 C# 库的引用菜单在 C++/CLI 项目中添加了引用。 然后我添加
#using <assembly.name.dll>
并尝试引用程序集
using namespace namspace.subnamespace;
但我收到无法找到 assembly.name.dll 的错误。 我尝试匹配程序集名称的大小写和全部小写,但没有成功。 令人惊讶的是,互联网上没有任何关于如何引用您自己创建的程序集的参考。
正确的做法是这样做,如果我做得正确,我应该采取什么措施来诊断这一点。
I have two projects in a solution, one is a C# library and the other is a C++/CLI library.
I have added a reference in the C++/CLI project using the references menu to the c# library. I then add the
#using <assembly.name.dll>
and try to reference the assembly with
using namespace namspace.subnamespace;
But i get the error that the assembly.name.dll cannot be found. I have tried matching the case and all lower case for the assembly name but to not avail. Amazingly there is not reference anywhere on the internet about how to reference assemblies you have created yourself.
What is the correct was to do this and if i'm doing it right, what course should i take to diagnose this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将 C# 程序集的路径添加到 C/C++ > 一般> 解决#using References
You need to add path to your C# assembly to C/C++ > General > Resolve #using References
如果您包含参考文献,我认为您不需要 #using 位。
I dont think you need the #using bit if you included a reference.