Thursday, March 26, 2009

How to include your DLL files into the final WSP file

Often developers reference external DLLs into their VS projects when developing application in Visual Studio. When a developers use the WSPBuilder or the VSeWSS to build their SharePoint projects, they can include the referenced DLLS in the WSP file.

To include/exclude the DLLs, view the properties of the referenced DLL in your VS project, and from the properties window, change the "Copy to local" property to "True" if you would like to include the DLL, or "False" to skip it. If the DLL file gets copied into the "bin" folder when building the project, that file will be included in your final WSP file.

Note that you will run into problems when installing/uninstalling the WSP files that share the same DLL file on SharePoint. The DLL file will be removed from the GAC if one of the solutions were uninstalled. SharePoint does not keep a count of the number of dependant solutions. It would have been good if SharePoint could keep track of the number of solutions that depend on the DLL files in GAC.

No comments:

Post a Comment