SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some reason xsm form doesn't remove from Manage Form Templates on Feature deactivation process, so looks like I should handle it myself. Can someone tell how to do this programmatically?

share|improve this question

Here are a couple of things you can try:

1) Go to Central Admin and check if the InfoPath form deletion job is stuck. If it is stuck stop it and try again.

2) Stop the SharePoint Administration service and open the SharePoint PowerShell command line. Execute the following command.

stsadmin execadmsvcjobs

Start the SharePoint administration service.

I hope this helps

share|improve this answer
up vote 0 down vote accepted

So I've found solution like this.

FormsService formsService = SPFarm.Local.Servers.GetValue<FormsService>(FormsService.ServiceName);
foreach (var ft in formsService.FormTemplates)
    if (ft.Name == "Your XSN Form Name Here")
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.