Could not load file or assembly CabLib or one of its dependencies

When using WSPBuilder from command line you may get the following error: “Could not load file or assembly ‘CabLib, Version=, Culture=neutral, PublicKeyToken=5c838b77b53f84a0’ or one of its dependencies. An attempt was made toload a program with an incorrect format.” This error occurs if there is something wrong with CabLib.dll or if CabLib.dll doesn’t exist in same folder with WSPBuilder.

Steps to fix:

  1. Make sure CabLib.dll is in same folder with WSPBuilder.exe
  2. Make sure you have correct version of CabLib.dll (32bit or 64bit)

On 64bit virtual server I replaced the old CabLib.dll with 64bit version and I got this error solved.

Gunnar Peipman

Gunnar Peipman is ASP.NET, Azure and SharePoint fan, Estonian Microsoft user group leader, blogger, conference speaker, teacher, and tech maniac. Since 2008 he is Microsoft MVP specialized on ASP.NET.

    Leave a Reply

    Your email address will not be published. Required fields are marked *