Cablib.dll could not load

Oct 10, 2008 at 12:27 PM
I'm running the latest release of WSPBuilder and extnsions for Visual Studio.  I installed the MSI for the extensions and it put all the files into C:\Program Files (x86).  I am running on a 64bit Windows Server 2003 system with SharePoint on it. 

When I try to build the WSP (right click and choose Build WSP) then I get an error:

Could not load file or assembly 'CabLib, Version=, Culture=neutral, PublicKeyToken=85376ef9a48d191a' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I have two versions of cablib.dll one is marked as 32bit and the other is named cablib.dll.  I tried renaming that one to cablib.dll.64bit (I assume it is the 64 bit one?) and renamed the 32 bit one to be cablib.dll and tried again, but got the same error. 

Can anyone help with this?
Oct 10, 2008 at 12:43 PM
OK I sorted it out - an easy one.  Both the DLL's were actually identical files, I had to get the 64bit cablib.dll separately and use that to overwrite the 32bit cablib.dll.
May 19, 2009 at 3:16 PM

i've the same problem.

I've well seen that this was generally because of this dll in 32 or 64bits.

But in my case :

                       - virtual machine window server 2003 (then 32bits)

                       - visual studio 2008

                       - wss v3

                       - Visual studio 2008 extensions for Windows SharePoint Services version 1.2

                       - ...


I 've well taken care of taking the right cablib.dll

And then WSPBuilder / Visual Studio 2008 can't load this dll


Do you see something else ?




May 21, 2009 at 12:34 PM

If you copy the cablib.dll from the 

C:\Program Files\WSPTools\WSPBuilderExtensions\Resources\x86

directory and copy it in the root (C:\Program Files\WSPTools\WSPBuilderExtensions\)

everything works fine. 

I've found the solution here:



May 22, 2009 at 8:04 PM

thank you very much.


It works !


Still not able to install WSPBuilderExtensions on Vista Business for vs 2008.

Abort of the installer with this message : error writing to file: WSPTools.BaseLibrary.dll. Verify that you have access to that directory.

Any idea ?





May 27, 2009 at 7:54 AM

Thanks for the solution it worked me for 32 bit  ,Will that support x64 version server too?

Do i need to copy the other cablib.dll (with 135K size and newly created one) to the deployment folder to get the solution deployed?

Please help  what do i have to do to make my solution to be deployed on both versions successfully ..Please help! it is urgent and important for me!

Thanks in advance


May 27, 2009 at 7:58 AM


  Please detail the way you have sorted the did you made the solution to pick the appropriate dll did u do it manually?

Please help ..I need this issue to be sorted out as am facing problem on x64 server?


Thanks in advance

May 27, 2009 at 8:08 AM

i'm not a specialist of wspbuilder.

I've seen there is also a wspbuilder console.

Perhaps you can use one with vs on 32 (or 64) bits and the other with 64 or (32) bits

Jan 20, 2011 at 8:08 PM

So just to recap since this thread hasn't been touched in forever: 

The solution is to

  1. copy the correct (32-bit or 64-bit depending on your system) cablib.dll found below C:\Program Files (x86)\WSPTools\WSPBuilderExtensions
    to C:\Program Files (x86)\WSPTools\WSPBuilderExtensions,
  2. open C:\WINDOWS\assembly in Explorer and
  3. drag the cablib.dll there to GAC it. 

If the correct (32-bit or 64-bit) is already in C:\Program Files (x86)\WSPTools\WSPBuilderExtensions, just GAC it.  In our case, the cablib.dlls in any project folders were irrelevant.