C++/CLI DLL namespace not found in MSVS C# Project (successfully reproducible)

ε祈祈猫儿з 提交于 2019-12-04 04:48:02

问题


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.

来源:https://stackoverflow.com/questions/5619752/c-cli-dll-namespace-not-found-in-msvs-c-sharp-project-successfully-reproducib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!