打包解决方案---WSPBuilder真不错

抽时间研究了下WSPBuilder.认识更进了一步

闲话少说,回归正题,wspbuilder能够帮助我们更好的打包moss解决方案包

下载地址:

http://wspbuilder.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24627

vs中文版本无法正常工作(kaneboy道出了解决办法:http://blog.joycode.com/kaneboy/archive/2009/02/25/115483.aspx),需下个补丁文件放到gac当中,

下载地址:http://www.codeplex.com/wspbuilder/WorkItem/View.aspx?WorkItemId=11301

 

如何实践呢?请看2篇博文:

http://blog.joycode.com/ipark/archive/2009/01/16/115436.aspx

http://blog.joycode.com/ipark/archive/2009/01/15/115435.aspx

 

 

按照上面的方法做了或许会出现一些问题,我遇到了windows sharepoint services Adminitration服务异常错误,启动服务即可解决。

 


注意,wpresources下面的文件夹必须和你要生成的用户控件所在的dll的名称一致。

这里至关重要,直接关系工程建立的成败!!!

 

几个重要的文件:

 

feature.xml:

<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="5ebd5650-3700-4627-82ae-ba8737625fc8"
          Title="IparkDebugPartFeature"
          Description="Description for IparkDebugPartFeature"
          Version="12.0.0.0"
          Hidden="FALSE"
          Scope="Web"
          DefaultResourceFile="core"
          xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="elements.xml"/>   
  </ElementManifests>
</Feature>

 

elements.xml:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="WebParts" List="113" Url="_catalogs/wp">
        <File Path="IparkDebugPart.webpart" Url="IparkDebugPart.webpart" Type="GhostableInLibrary" />
        <File Path="self.webpart" Url="self.webpart" Type="GhostableInLibrary" />
    </Module>
</Elements>

 

 

IparkDebugPart.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="Microsoft.PRC.SharePoint.ConsumerQuickPart, QuickPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2d0bb71b2dd16f9e" />
      <importErrorMessage>Cannot import Web Part.</importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="Title" type="string">Ipark Debug Demo Web Part</property>
        <property name="Description" type="string">Ipark Debug Demo Description</property>
        <property name="WrappedUserControlPath" type="string">~/wpresources/WSPUCPro/IparkDebugPartUC.ascx</property>
      </properties>
    </data>
  </webPart>
</webParts>

 

self.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="Microsoft.PRC.SharePoint.ConsumerQuickPart, QuickPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2d0bb71b2dd16f9e" />
      <importErrorMessage>Cannot import Web Part.</importErrorMessage>
    </metaData>
    <data>
      <properties>
        <property name="Title" type="string">Self Demo Web Part</property>
        <property name="Description" type="string">Self Demo Description</property>
        <property name="WrappedUserControlPath" type="string">~/wpresources/WSPUCPro/self.ascx</property>
      </properties>
    </data>
  </webPart>
</webParts>


最后wsp build  + wsp deploy即可,省略了quickpart的部署,因为WSP内置都是自动的部署,只需将quickpart.dll copy到site的bin下即可.

 

通过此方案打包了我们的quickpart,通过一些扩展可以实现我们更多的解决方案打包.用了之后感觉方便许多。呵呵。。。。

 


你可能感兴趣的:(properties,String,reference,Deployment,SharePoint,encoding)