问题
i have in my visual studio 2007 implemented webpart "Hello World".
in project there are webpart.cs, webpart.xml and webpart.webpart files.
i builded hole project, and tryed to load webpart.webpart
in my online sharepoint project which is on emea microsoft server.
loaded followinig: webpartcatalog->load->"webpart.webpart".
its loaded allright.
but when i want to add it in aspx page coming follow error ->
"Cannot import webpart webpart"
please help me load "Hello World" webpart. there is XML of webpart:
<?xml version="1.0" encoding="utf-8" ?>
- <webParts>
- <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
- <metaData>
- <!--
The following Guid is used as a reference to the web part class,
and it will be automatically replaced with actual type name at deployment time.
-->
<type name="df39a6a8-c663-4f78-becb-f09748d31927" />
<importErrorMessage>Cannot import WebPart1 Web Part.</importErrorMessage>
</metaData>
- <data>
- <properties>
<property name="Title" type="string">WebPart1 Web Part</property>
<property name="Description" type="string">WebPart1 Description</property>
</properties>
</data>
</webPart>
</webParts>
回答1:
As you said you have just uploaded the webpart file but this is not enough. you have to deploy the dll in gac and update the web.config with safe control entry.
easier option is to use wsp. add the solution using stsadm command deploy it to sitecollection you want activate the feature. your webpart would be ready to use
来源:https://stackoverflow.com/questions/6099041/load-sharepoint-2007-webpart-to-microsoft-online-emea