I get this error when I try to preview form. It contains C# code. I'm pretty much sure that I'm missing some C# reference, but I'm not sure which one. I'm not into C# too much so any help would be appreciated.
Here's detailed error description:
System.IO.FileNotFoundException
Could not load file or assembly 'Microsoft.Office.InfoPath.Client.Internal.Host.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
at Microsoft.Office.InfoPath.MsxmlNavigator.CreateNavigator(IntPtr nativeXmlNode, ICLRExtensions extensions, XDocument xdocument, Boolean boolReadOnly)
at Microsoft.Office.InfoPath.Internal.XmlFormHost.CreateNavigator(Object cur, Boolean boolReadOnly)
at Microsoft.Office.InfoPath.Internal.DataSourceHost.CreateNavigator()
at Microsoft.Office.InfoPath.XmlFormHostItem.CreateNavigator()
at Form_4.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e)
at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnLoad(DocReturnEvent pEvent)
at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)