简体   繁体   中英

How do you reference a C# project from a C++/CLi project in same solution

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.

您需要将C#程序集的路径添加到C / C ++>常规>解析#using References

如果你包含一个引用,我认为你不需要#using位。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM