CombineXPO: Length cannot be less than zero

November 28, 2017 at 17:12
filed under Dynamics AX
Tagged , , , , ,

We are moving from AX 2012 FP to AX 2012 R3 and our daily build was failing with the following error:

Length cannot be less than zero

We have traced the problem to the xpo files in version control that contain the (shared) projects. When these are added to the XPO, you get the error above.

There is a blogpost here that explains the problem.
So apparently, when moving from AX 2012 FP to AX 2012 R2 or R3, Microsoft has changed the file encoding of the xpo files for projects from UCS-2 Little Endian to UTF-8. CombineXPO has problems with this so it throws an error.

I did not make changes to CombineXPO, instead to solve this problem, I have converted all projects in my local repository to UTF-8 using a tool called UTFCast . Just make sure you have the Write BOM parameter checked. Then it’s just a matter of checking them in using Visual Studio. After that the build was succesful.

no comments

RSS / trackback