[Last Call] Learn how to a build a cloud-first strategyRegister Now


Cannot embed interop types from assembly 'Microsoft.SharePoint' because it is missing the 'Guid' attribute

Posted on 2011-10-26
Medium Priority
Last Modified: 2013-09-16
I'm trying to write an app in VB to access a SharePoint list.  

I have a 2003 server, with SharePoint 2007 installed on it, as well as Visual Studio 2010.

I've added a reference to Microsoft.SharePoint.dll in the \isapi\  directory, and added "Imports Microsoft.sharepoint" to my application. (Notice the lowercase 'sharepoint'... it didn't correct it, so I'm assuming it can't find it.)  This is confirmed when I attempt to create an object of type SPSIte (when trying to build the application):

"Error      1      Cannot embed interop types from assembly 'Microsoft.SharePoint' because it is missing either the 'ImportedFromTypeLib' attribute or the 'PrimaryInteropAssembly' attribute.      WpfApplication3"

Error      2      Cannot embed interop types from assembly 'Microsoft.SharePoint' because it is missing the 'Guid' attribute.      WpfApplication3

So.....  what I am doing wrong?
Question by:scmace
1 Comment

Accepted Solution

SharePointGirl earned 750 total points
ID: 37074756
Right click references, add reference, under .NET add Microsoft.SharePoint.

Need to ensure that it is targeted as a .NET 3.5 app not 4

Projects / appname properties

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question