none
The type or namespace name 'Sharepoint' does not exist in the namespace

    Question

  • Hi All ,

    i am using a console application in Visual Studio 2010 and accessing the sharepoint 2007 application ,it gives the error "The type or namespace name 'Sharepoint' does not exist in the namespace" even after adding the "Microsoft.sharepoint.dll" from "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI" .

    Can any one let me know why i am facing this error.Can we access MOSS 2007 applications in VS 2010?

    Thanks in Advance

    Bindu

    Thursday, July 05, 2012 7:30 PM

Answers

  • Try these also:

    1) Try Clean Solution from the solution context menu.

    2) Make sure that your projects are targeting .NET 3.5 (not 4.0 client profile)

    3) Make sure your build is configured to target "Any CPU"

    Thursday, July 05, 2012 8:57 PM

All replies

  • try this... switch to Any CPU build (don't choose x86)
    Thursday, July 05, 2012 7:45 PM
  • i tried switching Any CPU still it doesn't work

    Thanks in Advance

    Bindu

    Thursday, July 05, 2012 7:51 PM
  • Try these also:

    1) Try Clean Solution from the solution context menu.

    2) Make sure that your projects are targeting .NET 3.5 (not 4.0 client profile)

    3) Make sure your build is configured to target "Any CPU"

    Thursday, July 05, 2012 8:57 PM
  • Thanks it worked for me

    Thanks

    Bindu

    Thursday, July 05, 2012 9:01 PM
  • But right now i am facing this issue The Web application at http://XXXX/sites/IQDemo could not be found.

    Thanks in Advance

    Bindu

    Thursday, July 05, 2012 9:03 PM
  • Hi,

    I suggest you post your new question into a new thread, thanks!

    Rock Wang


    Rock Wang TechNet Community Support

    Friday, July 13, 2012 3:17 AM