I have found similar postings to people having this problem, but never did I find a solution.
It seems that with VS2008, if you create a 2007 InfoPath project, remove the code, and try to use C# (2003 Compatible) object model, it creates 6 compiler errors. Complaining that it cannot find type or namespace 'VisualStudio' nor can it find 'InfoPath' in the Microsoft.Office namespace.
Apparently when you remove code, it does not rebuild the FormCode.Designer.cs file to conform to IP2003. Instead, it seems to leave it as IP2007 object model, so the compile fails.
Anyone have any solution around this problem?