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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: