2
votes

I made a Webpart and I try to upload it to a Sharepoint Server 2010. I did this:

Insert -> Web Part -> Upload a Web Part -> Find the wsp file -> Upload

and I get this message

"The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML."

What step I miss? When I debug from Visual Studio (F5) it works ok.


update

The commands are:

stsadm.exe -o addsolution -filename C:\ABSOLUTEPATH.wsp

http://technet.microsoft.com/es-es/library/cc263162%28office.12%29.aspx

STSADM.EXE -o deploysolution -name NAMESOLUTION.wsp -immediate 
    -allowGacDeployment -url http://URLSERVER

http://technet.microsoft.com/es-es/library/cc262459%28office.12%29.aspx

2

2 Answers

6
votes

The file you are trying to upload is a SharePoint solution package. You can upload it (presuming it's not a sandboxed solution) via stsadm or the management console on one of your web front-ends. After deploying the solution package, a site collection scoped feature will be present that you can activate to make the webpart available in your site collection.

If it's a sandboxed solution, you can upload it via site actions (in the root site of your site collection), site settings, solutions (under galleries). In this case, you don't need access to the web front-end.

-1
votes

Greetings

You cannot upload a WSP - that is the file referring to the actual solution package in VS. You need to upload, as it is telling you, either a .webpart or .dwp file (which should be in your solution somewhere!)

Hope this helps.