I have a C# namespace defined as A.B.C which I tried using in a C++ header with
using namespace A::B::C;
and I get error C2653: A is not a class or namespace.
The unmanaged project is referencing the managed project with this namespace. How do I get around this? TIA.
COM Interop doesn’t let you do that. COM interop lets you retrieve a C++ COM interface pointer to a .NET object, using e.g.
CoCreateInstance.If you want to refer to the C# namespaces and types directly (not through a COM interface pointer), you want C++/CLI (the
/clroption for Visual C++).