Having WSPBuilder exclude your dll when creating a .wsp

Posted on 7/6/2008 @ 2:43 AM in #SharePoint by | Feedback | 4374 views

If you've been following the defacto community standard, 99.9% of us use WSPBuilder to craft up our WSPs. It is rather simple to use - you simply create a folder called "12" (or 80 or GAC), in your class library project, and you hook up your class library project's post build event to an Install.bat. In the install.bat, you call WSPBuilder to craft up a .wsp for you. Easy speezy lemon squeazy.

But sometimes, actually, quite often, you have a solution that doesn't contain a DLL. Maybe it's a feature in which "XML" was all you needed.

In order to tell WSPBuilder to not include your dll, you simply use it in the following manner -

   1: @echo off
   2: Echo Creating Solution Package
   3: %WSPPBUILDER% -outputpath solution -Excludepaths bin

By doing the above, you are telling WSPBuilder to not include the defacto dll created. The above will work, but to further optimize your development, you could edit the project configuration to not build, and in the project properties, call Install.bat "Always" instead of "On every successful build".

That's it! Now you can deploy the sometimes uber-simple solutions you need to create, and still use WSPBuilder.

Sound off but keep it civil:

Older comments..


On 9/17/2008 4:17:50 PM Hal Diggs said ..
Exactly what I was looking for, thanks. You Rock!


On 12/13/2010 1:58:33 PM Yvonne said ..
Thank you so much! It is so often that I find the answer to my questions in your blogs and articles. I do also love your books. I wanted to deliver a solution for a content type and I did not like two extra .dlls (cablib.dll from wsp and the project dll) and so did not my customer. Now I know how to manage it.

Best regards,


Yvonne