类型或名称空间名称"LayoutsPageBase"在名称空间"Microsoft.SharePoint.WebControls"中不存在 [英] The type or namespace name ‘LayoutsPageBase’ does not exist in the namespace ‘Microsoft.SharePoint.WebControls’

查看:59
本文介绍了类型或名称空间名称"LayoutsPageBase"在名称空间"Microsoft.SharePoint.WebControls"中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Visual Studio 2010在SharePoint 2010网站上创建一个Web应用程序页面.我创建了一个新的应用程序页面,但未向其中添加任何代码,但出现此错误.在其中不存在类型或名称空间名称"LayoutsPageBase"命名空间"Microsoft.SharePoint.WebControls".

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’.

推荐答案

您是否将项目创建为服务器场解决方案或沙箱解决方案?

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

Microsoft.SharePoint.dll有两个版本.如果您在项目中引用的版本是14 \ UserCode \ assemblies,则您正在使用沙盒版本.沙箱解决方案中不提供LayoutsPageBase类.

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.

这篇关于类型或名称空间名称"LayoutsPageBase"在名称空间"Microsoft.SharePoint.WebControls"中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆