Unable to add selected web parts(s) - SmartPartTemplateTest

May 16, 2008 at 9:27 PM
Edited May 16, 2008 at 9:37 PM

SharePoint Web Part(SmartTemplate) seems working fine.

I have trouble with SmartPart Web Part(SmartTemplate), Added "Microsoft.SharePoint.dll" to WSPBuilder directory, otherwise "createwsp.bat" was breaking at line 7..(..\WSPBuilder\WSPBuilder.exe -WSPName SmartPartTemplateTest.wsp -BuildCAS false -SolutionID 46dca1a4cb08)

 

 

Setup didn't give any error, and every thing looks good, means, files are in templates folder and bin folder.

Error message..
I get this error, when ever I try to add webpart to a page. Didn't modify any thing

"Unable to add selected web parts(s) WebUserControl1: Cannot import this Web Part"

Cannot import this Web Part.   at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)
   at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)
   at Microsoft.SharePoint.WebPartPages.WebPartPreview.get_WebPart()
   at Microsoft.SharePoint.WebPartPages.WebPartPreview.CreateChildControls()
   at System.Web.UI.Control.EnsureChildControls()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)






Seems I am missing something, any help, Please?

Environment

Development Machine
Vista, Visual studio 2008, .Net 3.5

 Server
Windows 2003 64 bit + MOSS 2007 + SP1

Thanks,
Shine

Developer
May 28, 2008 at 6:25 PM
Shinea,

The error you are having does not appear to be an installer error.  Have you tried deploying and installing your WSP without using the SharePoint Solution installer?  The SharePoint Solution Installer just makes it easier for end users to deploy and install features, but developers should use tools like stsdev.  If you suspect it is causing problems, please try manual deployment first.  I don't have a good set of steps on how to do this, but a quick search on the web came up with this link.  It is not perfect, but should help get you there.

Shinea wrote:

SharePoint Web Part(SmartTemplate) seems working fine.

I have trouble with SmartPart Web Part(SmartTemplate), Added "Microsoft.SharePoint.dll" to WSPBuilder directory, otherwise "createwsp.bat" was breaking at line 7..(..\WSPBuilder\WSPBuilder.exe -WSPName SmartPartTemplateTest.wsp -BuildCAS false -SolutionID 46dca1a4cb08)

 

 

 

Setup didn't give any error, and every thing looks good, means, files are in templates folder and bin folder.

Error message..
I get this error, when ever I try to add webpart to a page. Didn't modify any thing

"Unable to add selected web parts(s) WebUserControl1: Cannot import this Web Part"

Cannot import this Web Part.   at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)
   at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)
   at Microsoft.SharePoint.WebPartPages.WebPartPreview.get_WebPart()
   at Microsoft.SharePoint.WebPartPages.WebPartPreview.CreateChildControls()
   at System.Web.UI.Control.EnsureChildControls()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)






Seems I am missing something, any help, Please?

Environment

Development Machine
Vista, Visual studio 2008, .Net 3.5

 Server
Windows 2003 64 bit + MOSS 2007 + SP1

Thanks,
Shine




Jun 18, 2009 at 6:59 AM

hi here am developing silver light application in sharepoint.i did all integration part in sharepoint like (web.con,iis(mime properites setting)),but finaly am getting this error when open my webpart in webpart gallery.

Cannot import this Web Part. at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)
at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)
at Microsoft.SharePoint.WebPartPages.WebPartPreview.get_WebPart()
at Microsoft.SharePoint.WebPartPages.WebPartPreview.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

any body will know this solution please post to my mail id muralikrishna.thuraka@ascendum.com