c# - 对 Microsoft.SharePoint.dll 的引用

标签 c# c#-4.0 sharepoint sharepoint-2010

我有一台安装了 Shrepoint 的服务器。

我想测试这段代码:

SPUtility.GetLocalizedString Method

当我添加对 Microsoft.SharePoint.dll 的引用时,我可以解析 SPSite 和...。问题是当我想构建项目时,它无法识别 using Microsoft.SharePoint 更多:

enter image description here

我得到这个错误:

Error 13 The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

问题出在哪里?我添加了对 Microsoft.SharePoint.dll 的引用,但在构建时它不起作用

最佳答案

SharePoint 2010 中的 Microsoft.SharePoint.dll 使用 Framework 3.5 但 来自 SharePoint 2013 的 Microsoft.SharePoint.dll 使用 Framework 4.0

尝试一下。

关于c# - 对 Microsoft.SharePoint.dll 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20716319/

相关文章:

c# - 导入 Windows 窗体 (C#)、Visual Studio 2012

c# - 用可重用的方法替换 LINQ to SQL 查询的一部分

c# - 最佳实践 : Adding a CLI to Existing Windows Service in . NET/Core

javascript - 如何在每个时间段检测到最大条目时更改日历覆盖

sharepoint - 在 CAML 查询中使用部分日期

c# - 如何在 Windows Azure 辅助角色中安排任务

c# - 如何检测在文本框的 c# keydown 事件中输入的多个键?

c#-4.0 - Solr 搜索查询返回全头异常

c# - 将许多文本文件读取到字符串数组中 C#

asp.net - 何时在 SharePoint 中使用 Web 部件与完整的 ASP.NET 应用程序?