命名空间“SharePoint”命名空间“Microsoft”中不存在

发布于 2024-11-28 06:44:52 字数 451 浏览 2 评论 0原文

我正在关注本教程使用客户端对象模型。从顶部开始,我添加了引用,但是 using Microsoft.SharePoint.Client; 不断给我错误:

命名空间“Microsoft”中不存在命名空间“SharePoint”

但我在右侧面板上清楚地看到它。因此,查看说明,我能想到的唯一区别是我使用的是 Visual Studio Express,因此在创建新项目时无法选择使用哪个框架。除此之外,我不知道问题可能是什么。

有谁知道我还可能缺少什么或如何纠正这个问题?

I am following this tutorial on using the client-object model. And just starting from the top, I added the references, but using Microsoft.SharePoint.Client; keeps giving me the error:

The namespace 'SharePoint' does not exist in the namespace 'Microsoft'

But I clearly see it on the right side panel. So looking at the instructions, the only difference I can think of is the fact that I am using Visual Studio Express and thus do not have the option to choose which framework to use when creating a new project. Other than that, I don't know what the problem might be.

Does anyone have any ideas on what else I could be missing or how to correct this problem?

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

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

发布评论

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

评论(6

﹉夏雨初晴づ 2024-12-05 06:44:52

您需要将引用添加到 Microsoft.SharePoint.Client 程序集和 Microsoft.SharePoint.Client.Runtime 程序集 在该教程的开头附近指出

  1. 在客户端对象模型应用程序中使用的类位于 Microsoft.SharePoint.Client.dllMicrosoft.SharePoint.Client.Runtime.dll 中>。如前所述,在添加引用之前,必须将这些程序集从运行 SharePoint Foundation 的服务器复制到客户端开发计算机。

  2. 在“项目”菜单上,单击“添加引用”以打开“添加引用”对话框。

  3. 选择“浏览”选项卡,导航到放置 Microsoft.SharePoint.Client.dllMicrosoft.SharePoint.Client.Runtime.dll 的位置。选择这两个 DLL,然后单击“确定”。

You need to add the references to the Microsoft.SharePoint.Client assembly and Microsoft.SharePoint.Client.Runtime assembly as noted near the beginning of that tutorial:

  1. The classes that you use in a client object model application are located in Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll. As mentioned, before you add the references, you must copy those assemblies from the server that runs SharePoint Foundation to the client development computer.

  2. On the Project menu, click Add Reference to open the Add Reference dialog box.

  3. Select the Browse tab, navigate to the location where you put the Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll. Select both DLLs, and then click OK.

桃酥萝莉 2024-12-05 06:44:52

确保目标框架是 3.5 而不是 SP2010 的 4

Make sure that the target framework is 3.5 and not 4 i.e for SP2010

陌伤浅笑 2024-12-05 06:44:52
  1. 添加解决方案所需的参考。
  2. 确保SP2013 的目标框架为 4(SP2010 的目标框架为 3.5)。
  1. Add required references to the solution.
  2. Make sure that the target framework is 4 for SP2013(3.5 for SP2010).
酒与心事 2024-12-05 06:44:52

您完成了上面提到的教程的这一部分吗?

要构建应用程序,您必须添加对两个程序集的引用,
Microsoft.SharePoint.Client.dll 和
Microsoft.SharePoint.Client.Runtime.dll。安装SharePoint
Foundation 在服务器上安装这些程序集。两个组件
位于以下目录中:

%ProgramFiles%\Common Files\Microsoft Shared\Web 服务器
扩展\14\ISAPI

Did you do this part of the tutorial you mentioned above?

To build the application, you must add references to two assemblies,
Microsoft.SharePoint.Client.dll and
Microsoft.SharePoint.Client.Runtime.dll. Installing SharePoint
Foundation installs these assemblies on the server. The two assemblies
are located in the following directory:

%ProgramFiles%\Common Files\Microsoft Shared\web server
extensions\14\ISAPI

微暖i 2024-12-05 06:44:52

查看项目中的引用并确保您拥有对该程序集的引用。如果不存在,请尝试添加它,右键单击 --> 添加引用并找到“Microsoft.SharePoint.Client”

Take a look at the references in your project and make sure you have the reference to the assembly. If it is not there try adding it, right click -->add reference and find "Microsoft.SharePoint.Client"

万劫不复 2024-12-05 06:44:52

对于任何为 SP2019 进行开发的人,您需要以 .net 4.5 为目标

for anyone developing for SP2019, you need to target .net 4.5

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