TFS and presumably other source control systems do not behave well with InfoPath forms under Visual Studio. If you cannot open or build an Office InfoPath project in Visual Studio under source control, you need to read this KB article: http://support.microsoft.com/default.aspx?scid=kb;en-us;887039
Not mentioned in the KB article, is that when you try to build, this error will show as:
The "UpdateInfoPathManifest" task failed unexpectedly.
System.UnauthorizedAccessException: Access to the path '<projectdir>\InfoPath Form Template\manifest.xsf' is denied."
To fix this problem, check-out the manifest.xsf for edit.
The problem gets worse if you use a secondary data source. If you do, manifest.xsf will show that it has been modified. Building will generate the error "The operation could not be completed". Saving will generate the error "InfoPath cannot save the following form: InfoPath Form Template / The form is read-only." The only workaround I have, is to simply not work under source control.
Both of these problems have wasted a significant amount of my time and neither have easy to find solutions. Hopefully someone else will find this information useful. In short,
using (var ide = new VisualStudio())
using (var form = new InfoPath.Form()) { TFS.equals("Disaster!") }