System.Web.UI.WebControls.WebParts in ONET.xml

Came a cropper on this one today – using web parts based on System.Web.UI.WebControls.WebParts.WebPart in a Site Definition. Unlike the Microsoft.SharePoint.WebPartPages base web part, ASP.NET 2.0 ones need a <webParts /> tag around your <webPart> tag – other wise you get the error:

Cannot recognize the xml namespace of this web part

Joris Poelmans has a good description of the problem, and that was where I read the solution – it saved me a tonne of time.

System.Web.UI.WebControls.WebParts in ONET.xml

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.