I has a similar problem when I moved a project to a different machine
If you open your project and look at the solution explorer, open SolutionNameFormCode, open References, is their an explantion mark next to "Microsoft.Office.Interop.InfoPath.SemiTrust"?
If so right click reference and and click add reference, click browse and goto C:\Program Files\Microsoft Office\Office11 and select the Microsoft.Office.Interop.InfoPath.SemiTrust.dll ond click ok, mine worked after this (well after solving a few other things)