Nov 17 2009

WSPBuilder Project Migration Errors

Published by at 12:26 pm under .NET,Programming

This is an old article and the information contained within it may be out of date, not reflect my current views and/or contain broken links. If you feel this article is still valid and requires updating, you can use the contact form to let me know. However, I make no guarantee that it will get updated.

Today I tried migrating a Visual Studio WPSBuilder project from one machine to another.  The originating machine was 32bit Windows Server 2008 the destination machine was 32bit Windows Sever 2003 Standard.

To migrate the project I simply zipped the solution folder and copied it across to the destination machine, unzipped and opened in Visual Studio.

However, when I came to build the SharePoint solution file using the Tools -> WPSBuilder -> Build WSP, I got the following error in the output window:
“Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection”

When Googling the the error message the only result was on the WSP Builder CodePlex site and was about 64bit versions of the Cablib.dll assembly.  As neither of my machines is 64bit I figured this wasn’t the issue.

I’m not sure exactly what was causing the problem but this was the solution:

  • Open the project folder in Explorer
    • Delete the bin folder
    • Delete the obj folder
    • Delete the wsp file in the project folder.
  • Re-open the project in Visual Studio
    • Compile the project
    • Build the WSP (Tools -> WPSBuilder -> Build WSP)

After this everything was back to normal.

7 responses so far