The type or namespace name ‘LayoutsPageBase’ does not exist in the namespace ‘Microsoft.SharePoint.WebControls’

限于喜欢 提交于 2019-12-07 14:26:47

问题


I am attempting to create a web application page on a SharePoint 2010 site using Visual Studio 2010. I created a new application page without adding any code to it and get this error The type or namespace name ‘LayoutsPageBase’ does not exist in the namespace ‘Microsoft.SharePoint.WebControls’.


回答1:


Did you create your project as a Farm Solution or Sandbox Solution?

There are two versions of Microsoft.SharePoint.dll. If the version you have referenced in your project is from 14\UserCode\assemblies, then you are using the sandbox version. The LayoutsPageBase class is not available in sandbox solutions.



来源:https://stackoverflow.com/questions/7125717/the-type-or-namespace-name-layoutspagebase-does-not-exist-in-the-namespace-mi

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