SharePoint namespace does not exist in Microsoft namespace

So, I'm starting to learn C #, as I literally just started to learn, and based on the Java background, it doesn't look so bad. However, I have a question. I follow THIS tutorial on using the client-object model. And just starting at the top, I added links, but using Microsoft.SharePoint.Client; continues to give me an error that the “SharePoint namespace” does not exist in the “Microsoft” namespace, but I can clearly see it in the right sidebar. looking at the instructions, the only difference I can think of is the fact that I I’m using Visual Studio Express and, therefore, I don’t have the opportunity to choose which structure to use when creating a new project. In addition, I don’t know what the problem may be. Does anyone have any ideas on what else I can lose or how to fix it this problem?

+6
source share
6 answers

You added assembly links to Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime how to mark at the beginning of this tutorial?

+6
source

Make sure the target structure is 3.5, not 4 ie for SP2010

+8
source

Have you done this part of the tutorial mentioned above?

To create an 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. Two assemblies are in the following directory:

% ProgramFiles% \ Shared Files \ Microsoft Shared \ Web Server Extensions \ 14 \ ISAPI

+4
source
  • Add the necessary links to the solution.
  • Make sure the target structure is 4 for SP2013 (3.5 for SP2010).
+4
source

Take a look at the links in your project and make sure you have an assembly link. If it’s not there, try adding it, right-click → add the link and find "Microsoft.SharePoint.Client"

+2
source

Thanks to those who mentioned 4.0.

Mine has a default .NET Framework 4 client profile (and I have no idea what that means), and the namespaces look good in Intellisense, but the assembly says they were not found! Crazy.

+1
source

Source: https://habr.com/ru/post/894221/


All Articles