Operation is not valid due to the current state of the object.

I came across this error today while attempting to update my WSP via Sharepoint Powershell console.

I have been working on creating calculated fields in xml and the requirement was to include the <= (less than or equal to) symbol in the schema. Because this didn’t work, I changed this symbol to &leq. When I atttempted to update the solution, this is the error I got in the powershell window

Operation is not valid due to the current state of the object.

I removed &leq; from the fields xml and list xml schemas and this fix the problem, but not the requirement.

 

But if you are ever working with fields, content types, or lists schemas and you come across this problem, the likely issue would be invalid symbols or syntax in the xml.

Advertisements