Cause of this error: dll reference for Microsoft.SharePoint.dll is missing. Even after installing WSS extension for Visual Studio 2005 and creating a web part project you can recieve this error if the Microsoft.SharePoint.dll is not found in 12 hive path i.e. C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI.
You can find all the WSS related .dll files at this path C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI, so if you recieve such kind of error probable reason is .dll files are not available in this folder.
Best approach to come up with this problem is either reinstall WSS extension for VS.Net or Try Start > Search and find this file “Microsoft.SharePoint.dll” so that if in case you have installed it other than default location you can able to add reference and can go ahead.