ASP.NET System.Anything is not defined

霸气de小男生 提交于 2019-12-25 07:58:28

问题


I ran Debugging and got a ton of "is not defined" errors in all the namespaces under System. The System and System.Web references are in the References folder.

Trying to back track the things I've changed since the last debug, I reduced my root namespace from the default to a three letter abbreviation. Changing it back didn't do anything. Everything else I've been working on has been individual pages.

Most (not all) of the errors go away if I add Global.System to all the namespaces or if I reduce them to the child namespace. i.e. these don't throw errors:

Global.System.Web.UI.Page

Page

But this does:

System.Web.UI.Page

Disclaimer: I'm a .NET novice.


回答1:


You tried closing and reopening Visual Studio, or doing a Full Rebuild?




回答2:


Do you have a class named "System"? Or "Global"?



来源:https://stackoverflow.com/questions/10509010/asp-net-system-anything-is-not-defined

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