The type or namespace cannot be found (are you missing a using directive or an assembly reference?)

前端 未结 5 939
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 14:45

I get the following error when I try to compile my C# program:

The type or namespace name \'Login\' could not be found (are you missing a using directive or an

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 15:45

    I get this error when my project .net framework version does not match the framework version of the DLL I am linking to. In my case, I was getting:

    "The type or namespace name 'UserVoice' could not be found (are you missing a using directive or an assembly reference?).

    UserVoice was .Net 4.0, and my project properties were set to ".Net 4.0 Client Profile". Changing to .Net 4.0 on the project cleared the error. I hope this helps someone.

提交回复
热议问题