Reference to Microsoft.SharePoint.dll

18,578

Solution 1

Microsoft.SharePoint.dll from SharePoint 2010 use Framework 3.5 but Microsoft.SharePoint.dll from SharePoint 2013 use Framework 4.0

try it.

Solution 2

Change Visual Studio project solution properties platform target to x64 and the target framework to .NET Framework 3.5.

Share:
18,578
Arian
Author by

Arian

Please vote-up this thread: RDLC Report Viewer for Visual Studio 2022

Updated on June 08, 2022

Comments

  • Arian
    Arian almost 2 years

    I have a server that Shrepoint installed on it.

    I want to test this code:

    SPUtility.GetLocalizedString Method

    When I add reference to Microsoft.SharePoint.dll I can resolve SPSite and ... .The problem is When I want to build the project it does not recognize using Microsoft.SharePoint any more:

    enter image description here

    and I get this error:

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

    where is the problem? I add reference to Microsoft.SharePoint.dll but in build time it does not works