Social Icons

Pages

Friday, November 23, 2012

How to resolve "The type or namespace name 'SharePoint' does not exist in the namespace ....”

In this article we are going to see how to resolve "The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) " for Windows form application in Visual Studio 2010
  • Windows 7, 64 bit
  • Added the reference Microsoft.SharePoint.dll  
Even you are getting the above error
The reason of this error is:

"SharePoint 2010 does not support .Net 4.0 in default and Visual Studio 2010 default framework is .Net 4.0."

How to resolve this error: 

  •  Go to the Solution explorer.
  •  Right click on the Solution Explorer and click Properties.
  •  Select Application Tab, Change the Target framework into .Net Framework 3. 
  •  Once you change the Target Framework "Target Framework Change "wizard will pop up.
  •  Click Yes.
  •  Go the Build tab and change the Platform Target to x64.
Now you will be able to debug successfully.

No comments:

Post a Comment