Sharepoint and TaskListContentTypeId with mixing Office workflow tasks with regular sharepoint workflow tasks. Part 2

The reason the Office Sharepoint Server Workflow Task is not visible is because it is assigned to a special group named "_Hidden" which precludes it from being displayed in the site collection content type view.

As it turns out content types are exposed and manipulable through the Sharepoint OM using the class SPContentType. You can get a list of content types from a SPWeb by invoking the getter on property ContentTypes:

1SPSite site = new SPSite("http://splaptop"); using (SPWeb web = site.OpenWeb()) {   foreach (SPContentType contentType in web.ContentTypes)   {     if (contentType.Name == "Office SharePoint Server Workflow Task")     {       /\*        \* make a member of whatever group you like...        \* nb. if group is == "\_Hidden" (default) then it will not show up        \* in the list of content types        \*/       contentType.Group = "MOSS";       contentType.Update();     }   } } 
2```The content type will now be visible when you try to assign it to a task list.