This error may occur after you launch an XSN file with the same form ID as
the form template in your Visual Studio project. The XSN file is cached on
your hard disk, but with default XML that doesn't conform to your current
schema.
Workaround - close down VS2005 and double-click manifest.xsf in the InfoPath
Form Template subfolder within your project folder. Answer YES to the big
warning box that pops up. Then close down InfoPath and reopen your project in
Visual Studio. You should now be able to run the form in Preview mode from
VS2005.

Signature
David Dean
Sr. Member Technical Staff
Insource Technology Corp.
> Vista, VS2005, InfoPath 2007, SQL2005, managed VB, full trust
> Erroneous error, “InfoPath cannot open the selected form.” This IS NOT the
[quoted text clipped - 7 lines]
> with the exact same schema and code, everything it works fine. Any ideas
> would be welcome. Thanks, Frank.
FrankS - 03 Aug 2007 01:32 GMT
Thanks Dave. It cleared the error and I was able tp open the form in VS2005
again. Is there a way to clear the cache "manually" (by command?) to avoid
this type error? Thanks again for the qucik response!
> This error may occur after you launch an XSN file with the same form ID as
> the form template in your Visual Studio project. The XSN file is cached on
[quoted text clipped - 18 lines]
> > with the exact same schema and code, everything it works fine. Any ideas
> > would be welcome. Thanks, Frank.
David Dean - 03 Aug 2007 12:52 GMT
Try using the following command to clear the form template cache:
"C:\Program Files\Microsoft Office\Office12\InfoPath.exe" /cache ClearAll

Signature
David Dean
Sr. Member Technical Staff
Insource Technology Corp.
> Thanks Dave. It cleared the error and I was able tp open the form in VS2005
> again. Is there a way to clear the cache "manually" (by command?) to avoid
[quoted text clipped - 22 lines]
> > > with the exact same schema and code, everything it works fine. Any ideas
> > > would be welcome. Thanks, Frank.
FrankS - 08 Aug 2007 00:08 GMT
Thanks Dave. Have a nice day!
> Try using the following command to clear the form template cache:
>
[quoted text clipped - 26 lines]
> > > > with the exact same schema and code, everything it works fine. Any ideas
> > > > would be welcome. Thanks, Frank.
Mayur - 06 Apr 2008 20:57 GMT
HI Dave
I am facing the same issue. Form was working fine, after I made some changes
in form, I am getting this error while previewing the form. I tried clearing
cache using the command and opening manifest.xsf. It previewed when I double
clicked the manuifest but then I opened manifest indesign mode and then tried
to preview, it again gave me error. Any Idea what shall I do?
> Thanks Dave. Have a nice day!
>
[quoted text clipped - 28 lines]
> > > > > with the exact same schema and code, everything it works fine. Any ideas
> > > > > would be welcome. Thanks, Frank.