Building a WSP with Infopath Forms
A WSP is the preferred deployment solution for anything to do with sharepoint, such as web parts and workflows. While the workflow solution in Visual Studio should auto-generate a lot of the manifest.xml file that is used, there are a couple of little things that need to be altered before it will behave as expected.
- Build the solution in Release mode before attempting to alter any of the files that have been provided, the auto-generation tool doesn't run until the first build.
- Check that the manifest.xml is deploying the main workflow dll to the GAC. The correct setting in the 'Assembly' line is 'DeploymentTarget="GlobalAssemblyCache"'.
- Alter the wsp_structure.ddf to include the Infopath forms that are used within the workflow. The solution should have created the basic structure, then all that should be necessary is to add the form location and form name for every form that you are using, following the sample that has been provided.
- If you have any Infopath forms with Code Behind, it is necessary to manually add the dll to the manifest.xml so that they get deployed to the feature directory along with everything else that is required.
- Use the 'Resources' tag in the manifest.xml
- Give the location and name of the dll ( "ProjectName\DllName.dll" )
- Build, Deploy and Test
- Build
- stsadm -o addsolution -filename <filename>.wsp
- stsadm -o deploysolution -name <filename>.wsp -local -allowgacedeployment (might also require -url <site to deploy to>
- install and activate as required.