Reference added but Namespace is not recognized

前端 未结 8 1553
不知归路
不知归路 2021-01-11 12:56

I added a DLL to my project. The DLL contains the namespace test.security. Now, test.security is not recognized. Why is this?

I am using this DLL in oth

8条回答
  •  不知归路
    2021-01-11 13:43

    I also faced this problem. In my case I tried removing the reference, rebuilding the referenced project, and then adding it again, but the problem still persisted.

    The problem in my case was the classes in the targeted project's namespace were not public. This meant there was nothing accessible in that namespace, so it didn't really exist.

    Setting them to a public access level solved the problem. Hope it helps someone! :)

提交回复
热议问题