Dealing with InfoPath Form Templates in Visual Studio 2008 with TFS

Posted Monday, January 12, 2009 1:20 PM by CoreyRoth

I have been building a large number of InfoPath Form Templates in Visual Studio 2008 lately and I have discovered it is can be quite the exercise in frustration when you want to put your files in TFS (or any source control for that matter).  There are a number of reasons for this, but it all starts with the fact that the form template designer does not like it when files are read only.  Unlike other project types that will automatically check out files that are needed, the InfoPath form template project will not do this.

Before, you begin working with an InfoPath template file in source control, be sure that you checkout (at a minimum) manifest.xsf.  For some reason any time you compile, this file must be checked out.  On top of that, if you want to publish your form, it seems to require that this file is checked out in all other form projects in your solution.  It looks like it does a build solution prior to launch the publish form template dialog.   As you are editing your form, other files in the project will more than likely need to be modified, so my recommendation is that you check the entire project.

As you are working, you might come to a point where you receive an error like the following when trying to save your file.

InfoPath cannot save the following form: InfoPath Form Template.  The form is read-only.

When this occurs, it really is a bad time because every time I have received it, the form was already checked out and not marked read only.  The only solution I have found for this is to close Visual Studio and restart it.  This can be particularly frustrating when you have made a bunch of changes to the form template as you will end up losing them.  For this reason, I have made a practice of attempting to save the form, before I start making any changes to it.

Another error that you may often run into is the following.

The operation cannot be completed.

This can occur when trying to publish or when trying to open the manifest.xsf file.  When this occurs, your best bet is to make sure all files in the project are checked out and restart Visual Studio.  If you are lucky, you will be able to open the form or publish it again.  If not, my recommendation is to go back to a previous version and hope for the best.

Another issue you might run into occurs when checking in.  If you try to check your files in while you still have manifest.xsf open in the form designer, you will get the following error.

The process cannot access the file 'MyTemplate.xsf' because it is being used by another process.

The designer seems to create a lock file so no external process can even read it.  Just make sure you close the file first before you try to checkin and you will be good.

Comments

# re: Dealing with InfoPath Form Templates in Visual Studio 2008 with TFS

Tuesday, November 10, 2009 2:10 AM by Svetlana Tipping

very useful piece of information and stright to the point.

# Dealing with InfoPath Form Templates in Visual Studio 2008 with TFS | Seslichatcity - Forum - Film izle - Programlar - Diziler - Bur??lar - Haberler - Mp3 - Oyun

Pingback from  Dealing with InfoPath Form Templates in Visual Studio 2008 with TFS | Seslichatcity - Forum - Film izle - Programlar - Diziler - Bur??lar - Haberler - Mp3 - Oyun

# re: Dealing with InfoPath Form Templates in Visual Studio 2008 with TFS

Tuesday, March 23, 2010 2:01 PM by Kocko

Hi, Is there any trivial way to automate the publish of a form template to a sharepoint library?!

I tried a lot of things, but Infopath seems very complicated in allowing that.

The disclaimer here is that I don't want to use the Enterprise FormServerTemplates for which there are a lot of blog posts there in the internet. I don't want to use browser-enabled forms, I don't even need the form template to be signed or versioned. I JUST need a plain template, like word templates. I tried to find more on that:

williamvanstrien.blogspot.com/.../automatic-publish-infopath-forms-via.html , but he couldn't give me clear explanation what is XsnFeatureReceiver used for, and misleaded me even more!

Thank you for your time

# re: Dealing with InfoPath Form Templates in Visual Studio 2008 with TFS

Saturday, October 9, 2010 3:25 AM by Praveen

Thanks alot for the post. Here I have placed all possibilities as discussed:praveenbattula.blogspot.com/.../infopath-form-cannot-save-following.html

Leave a Comment

(required) 
(required) 
(optional)
(required)