Infopath VSTO/ VSTA post-build steps
Here are the steps for the post-build to build and deploy the infopath forms automatically:
1. Deactivating the previous edition of the form
stsadm -o deactivateformtemplate -url "SITE COLL URL" -filename "XSN FILE PATH"
2. Removing the previous version of the form
stsadm -o removeformtemplate -filename "XSN FILE PATH"
3. Kick the job service (saves you the wait)
stsadm -o execadmsvcjobs
4. Uploading the new template
stsadm -o uploadformtemplate -filename "XSN FILE PATH"
5. Kick the job service (again)
stsadm -o execadmsvcjobs
6. Activating the new form template
stsadm -o activateformtemplate -url "SITE COLL URL" -filename "XSN FILE PATH"
Using bat file in my next post.
Happy code...