I had WebParts developed for SharePoint 2003.
They inherited from Microsoft.SharePoint.WebPartPages.WebPart class.
I followed recommendations and update them to System.Web.UI.WebControls.WebParts.WebPart. I got the error:
error CS0115: 'IDSKWPHoroscope.Horoscope.GetToolParts()': no suitable method found to override
Googling the problem I found this article:
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1453072&SiteID=17
It didn't help however. My goal was to switch to the new .NET Framework 2.0 classes and not continue using Microsoft.SharePoint.WebPartPages.WebPart class.
Solution came from Share Point documentation. New WebPart class has method:
public virtual EditorPartCollection CreateEditorParts()that replaces the old one:
public virtual ToolPart[] GetToolParts()Now it uses a collection of EditorParts.
The toolparts should inherit from
System.Web.UI.WebControls.WebParts.EditorPart
istead of
Microsoft.SharePoint.WebPartPages.ToolPart
Some over properties changed in the EditorPart class in comparison with ToolPart class (like AcceptChanges() now returns bool and there is no CancelChanges() ).
Small twicks solve problems.