.DWP vs .WEBPART

1. .DWP is for a SharePoint webpart

  • The post-build command line can use SafeGAC and go into the content site, not central admin. For example:

    set DllInstallTarget=SafeGAC
    set WspDeployTarget=http://Moss1
    set QuickModeTarget=Upgrade

2 .WEBPART is for an asp.net webpart

3. Both .dwp and .webpart have properties to be set for the “Custom” portion of the webpart’s edit tool pane

4. Both have a Features section containing:

  • A class
  • A Feature.xml
  • Another .xml that corresponds to the Feature.xml and holds .resx properties.

5. Both .dwp and .webpart go into the web part gallery

6. With the .dwp, if a property changes then the webpart must be deleted and the feature de-activated before deploying the new version.

To Deploy A WebPart To SharePoint

1. At LEAST one of the following:

  • a. Assign a strong name
  • b. Mark the assembly with the AllowPartiallyTrustedCallers attribute
  • c. Configure the attribute inside your SharePoint site’s web.config file.

2. Mark your assembly as a SafeControl inside of your SharePoint site’s Web.Config file.

3. Add your web part library to the site’s web part gallery.

4. Add web parts from your assembly to pages in your site.