Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

Error Compiling Old Visual Studio Project

Posted by Steve Pietrek on September 21, 2010

So I had one of those idiot moments. I am preparing for a SharePoint 2007 Development training class I am giving next week. I was attempting to compile a Visual Studio project that defined my web part definitions. I received the following error when I attempted to compile the application. I was referencing the Microsoft.SharePoint assembly correctly.

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

This particular project had not been compiled since before SP2 was released. I am sure you can see where this is going. Anyway, after pulling my hair out for 30 minutes, I soon realized my mistake. Since the project was last compiled prior to SP2, the target framework was still set back to “.NET Framework 2.0”. Setting the target framework to “.NET Framework 3.0” resolved my issue.

Sorry, the comment form is closed at this time.

%d bloggers like this: