Question

I am working with WSS 3.0, Visual Studio 2008, and WSPBuilder 0.9.9. I have a custom class library (WebParts.dll) of base classes that I use with several SharePoint solutions. I currently deploy WebParts.dll to the GAC, and add it as a reference in each solution. My current arrangement works fine, but I have to manually deploy the DLL to the GAC on each web server when it changes.

I would prefer to either (a) wrap WebParts.dll in a WSPBuilder or VseWSS solution that can be deployed just like any other solution, or (b) include WebParts.dll in the 80/bin folder in each solution.

Which would be the preferred method to deploy my dll, and can someone point me to step-by-step instructions online? I found this blog post describing some of part b, but I think I am missing a step:

http://blog.vanmeeuwen-online.nl/2010/05/deployment-of-class-library-with.html

Thanks for your help!

Was it helpful?

Solution

If your DLL is placed in the bin\debug or bin\release folders of your project (e.g. "Copy Local" equal to true for your DLL Reference), the DLL will automatically be included in your WSP and deploy according to the DeploymentTarget of your local WSPBuilder.exe.config file.

If you are sharing the same DLL across multiple projects, it might make more sense for you to package the shared DLL in it's own feature/deployment package and utilize feature activation dependencies within your other projects to ensure the DLL has been deployed.

You may need to upgrade to a more recent version of WSPBuilder. I believe 1.0.5 is the first release to support local config support.

Hypothetical Setup

  • My Web Parts (VS Solution)
    • WebParts (VS Project) - This contains your base DLL (WebParts.DLL) that you want to utilize within your other projects
    • MyWebPart1 (VS Project) - This project is one of your web parts. Add a project reference to the WebParts project and do not copy the WebParts.DLL locally.
    • MyWebPart2 (VS Project) - This project is one of your web parts. Add a project reference to the WebParts project and do not copy the WebParts.DLL locally.

When you build the VS projects WebPart1 or WebPart2, the reference will resolve in Visual Studio.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top