类型或命名空间名称“LayoutsPageBase”命名空间“Microsoft.SharePoint.WebControls”中不存在;

发布于 2024-11-30 09:06:06 字数 175 浏览 3 评论 0原文

我正在尝试使用 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’.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦晓ヶ微光ヅ倾城 2024-12-07 09:06:06

您将项目创建为农场解决方案还是沙盒解决方案?

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文