Installing a WebPart in MOSS 2007

May 5, 2008 at 10:38 PM
I took an existing web part created in .NET 1.1 that loads a user control(.ascx). I pulled the web part project and the user control project into a solution in VS 2008. I changed my .dwp file to a .webpart file. I installed the webpart into MOSS by xcopying the webpart dll to the bin folder and I created a usercontrols folder and copied the user control and .cs file there. I can browse for the webpart but when I try to add it on the page I get: Unable to add the selected web part(s). The <type> element is required. Add this element to the Web Part file(.webpart), and then try to import the Web Part. Here is my .webpart file:

<?xml version="1.0" encoding="utf-8"?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3" >
<metadata>
<type name="ShipListWebPart.ShipList, ShipListWebPart, Version=2.1.1.1, Culture=neutral, PublicKeyToken=tokengoeshere" />
<importErrorMessage>Cannot import the ShipList WebPart</importErrorMessage>
<Title>ShipList WebPart</Title>
</metadata>
<data>
<properties>
<property name="Title" type="String">ShipList</property>
<property name="Description" type="String">ShipList Webpart for appname</property>
</properties>
</data>
</webPart>
</webParts>
Coordinator
May 6, 2008 at 8:27 AM
Is this question related to the SmartTemplates?
May 6, 2008 at 1:16 PM
No, but the architecture is the same. I have a web part that loads a user control. I am trying to get to where I can debug the usercontrol/web part and I am trying to install the web part into MOSS. I just xopied the code/files to the right directories on the server. I can even see the web part in MOSS but when I try to drag it to a web part zone, that is when I get this error.

thanks