If you get an error message trying to open an InfoPath form and in the details you see an error message that says something like:
"The format of the file <name>.dll is invalid."
I have finally found a solution. Go to your Program Files, Microsoft Office folder and look in the Office 11 or Office 12 folder. In there look for a file called infopath.exe.config. Delete it.
Now the solution will open.
This error happens with managed code solutions and the config file is forcing the use of one version of the .NET Framework and the form you're trying to open needs a different version.
Note this typically happens when the user has installed Visual Studio on the machine.
I hope this helps.
Shiraz Cupala / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge