I'm developing a really large InfoPath form for SharePoint List. After I had to restart my computer the file became corrupted somehow and I don't know how to open it. Here's the error message I get from InfoPath when trying to opent the file.
InfoPath cannot open the following form The form definition (.xsf) file contains errors.
The form definition (.xsf) file contains elements, attributes, or structures that are not valid.
Error details: The keyref 'ruleSet_202' does not resolve to a key for the Identity Constraint '{http://schemas.microsoft.com/office/infopath/2003/solutionDefinition}ruleset_name_key'.
Line 2145, Position 3 --^
I changed .xsn extension to .cab and extracted all the contents. I looked into the manifest file and saw that Line 2145 is actually the last line of the document. I can not find error in it, nor near by.
Help pls
Solved it myself. It was quite easy actually. I just deleted the "button" node that contained ruleSetAction with the problematic ruleSet.
As you can not add edited manifest file back to the archive, you will have to choose "Design" option from the context menu on manifest file. That will open the form in Infopath and you can do "Save As" so you can have everything packed again.