3
votes

I have a similar problem to C++/CLI DLL namespace not found in MSVS. I am using VS2010.

I have a C++/CLI Assembly (DLL) that contains managed wrapper (public ref classes) code about unmanaged C++ code. When I reference this project from a C# project (in my actual project, its a C# class library, but I can duplicate this behaviour with a C# winforms application), no types are accessible (verified in the Object browser). I get, for example,

"error CS0246: The type or namespace name 'CLILib2' could not be found (are you missing a using directive or an assembly reference?)"

when trying to use the namespace.

My assembly is properly referenced. Its dependancies are properly set. I can't find any duplicate linker errors.

I have a demo project.

If you share the demo project, I would take a look. You could use filedropper.com or something similar to share the project.Matt Smith
Hi Matt. Many thanks for the reply and offer. I figured out my very fundamental and extremely silly mistake -> I had declared everything inside an H file and unthinkingly excluded the CPP file. Thus no code gen...this is resolved! Best regards, EEugene