C++/CLI DLL namespace not found in MSVS C# Project

2019-02-26 13:50发布

问题:

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.