Home > SharePoint 2010 > Fix the exception “The type or namespace name ‘SharePoint’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)”

Fix the exception “The type or namespace name ‘SharePoint’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)”

If you got the exception “The type or namespace name ‘SharePoint’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)” While you have already added the Micorsoft.SharePoint.dll into your project, check the application tab of your project properties page and make sure your project Target framework is .NET Framework 3.5, not .NET Framework 4.0 Client Profile.

The exception:

I have already added the references:

To fix it go to your properties page and click the Application tab and change the target framework to .NET Framework 3.5 and recompile your project , it worked like a charm.

 

Change from

TO

Advertisements
Categories: SharePoint 2010
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: