Similar situation to JohnZ: I have Office 2013, InfoPath 2013, VS 2012 and VSTA for VS 2012, SharePoint Enterprise Server 2013. I've been coding in C# for several weeks within the same form without any errors. Today I tried to open the Code Editor and received the "Famous InfoPath has encountered an error. The operation failed." So I clicked Language and the Form Options window appeared. I viewed the Programming Category. The correct code language is selected: C#. The Target version is InfoPath. The Project location is correct. In fact, I used the Browse button to re-select the C# code project. Then I clicked the OK button and tried the Code Editor option again. The same error message appeared.
Is there a Microsoft MVP or support person online who can assist with our issue? My project is at a standstill because I cannot access the code behind! Please, this is an urgent issue! Thanks in advance for your assistance!