Troubleshooting SharePoint Workflow Solutions
Applies to |
---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office. Project type
Microsoft Office version
For more information, see Features Available by Application and Project Type. |
The following issues might occur when you develop SharePoint workflow solutions by using Visual Studio Tools for Office.
Execution Stops at Break Points Two Times
This problem can occur if you change the display name of the workflow. When you start the Visual Studio debugger, the workflow deployment process creates a new association between the workflow assembly and the library or list.
The association that existed before you changed the display name still exists in the SharePoint Web site. Because both associations reference the same workflow ID, the workflow assembly is executed two times.
To resolve this issue, manually remove the old association from the library or list in SharePoint. For more information about manually removing workflow associations from a library or list, see the Office Online article Add or change a workflow for a list, library, or content type.
For more information, see Debugging SharePoint Workflow Solutions.
SharePoint Workflow Projects Show Message That States That Administrator Access Is Required
This problem can occur if you are not logged on to the development computer as an administrator and you attempt any of the following tasks:
Create a new project by using the New Office SharePoint Workflow wizard.
Modify an existing project by using the New Office SharePoint Workflow wizard.
Debug a SharePoint workflow project by using the Visual Studio debugger.
Error Message
You must be logged on as an administrator to work on SharePoint workflow projects.
Resolution
Log on to the development computer by using an account that is a member of the Administrators group.
Debugging
The following problems might occur when you debug a SharePoint workflow template by using the Visual Studio debugger. For more information, see Debugging SharePoint Workflow Solutions.
The Site Location Is Not Valid
This problem can occur if SharePoint Server 2007 is not installed. It might also occur if you do not have administrator access to the SharePoint Server Web site that is specified in the New Office SharePoint Workflow wizard.
Error Message
- SharePoint site location is not valid.
Resolution
Install Microsoft Office SharePoint Server 2007.
Ensure that you have administrator access to the SharePoint Web site. For more information, see the Office Online article Grant access to the portal site.
Cannot Create the Destination Directory or Locate the Destination Directory Path
This problem can occur when the workflow deployment process cannot create a feature directory.
Error Messages
Cannot create the destination directory for this file: <file>.
Cannot locate the feature.xml deployment destination path.
Cannot locate the workflow.xml deployment destination path.
Cannot determine workflow.xml destination path for deployment.
Resolution
Repair your installation of SharePoint Server 2007. A key is missing from the registry. The workflow deployment process uses this key to determine where it should create the feature directory. The key is added to the registry when you install SharePoint Server 2007. For more information, see Working with Features.
Cannot Locate or Copy Files
This problem occurs when the workflow deployment process cannot copy the feature definition file and the workflow definition file to the SharePoint feature directory. These files could have been renamed or deleted from the project.
Error Messages
Cannot locate the file at <path>.
Cannot copy <file> to <path>.
Cannot find this file: <file>.
Cannot find feature.xml in the project.
Cannot find workflow.xml in the project
Cannot copy the workflow.xml file to <path>.
Resolution
Ensure that the feature and workflow definition files appear underneath the project node in Solution Explorer. The feature definition file must be named feature.xml. The workflow definition file must be named workflow.xml. To replace a missing file, follow these steps:
Create a new SharePoint workflow project.
Copy the feature.xml or workflow.xml file from the new project to the project that is missing the file.
In the new feature.xml file, modify the Title and Description attributes of the Feature element.
In the new workflow.xml file, modify the Name, Description, CodeBesideClass, and CodeBesideAssembly attributes.
For more information about feature definition files, see Feature.xml Files. For more information about workflow definition files, see Workflow Definition Schema.
Assembly Cannot Be Installed into the Global Assembly Cache
Error Messages
The assembly could not be found at this build location: <path>.
The .NET Framework is not correctly installed.
Ensure that the assembly is signed.
Resolution
To resolve these issues, try the following options:
Ensure that the assembly builds successfully and that the workflow assembly is created in the build output location of the project.
Ensure that the .NET Framework is correctly installed.
Perform the following three steps to ensure that the assembly is signed:
Ensure that the project contains a strong name key file that is named key.snk.
In Solution Explorer, right-click the project node, and then click Properties. Click the Signing tab and ensure that Sign the assembly is selected.
Open workflow.xml and verify that the CodeBesideAssembly attribute contains a valid public key token.
You can also manually sign the assembly. To do this, follow these steps:
Create a new strong name key file and name that file key.snk. For more information, see How To: Sign an Assembly (Visual Studio).
Create a public and private key pair for the workflow assembly. For more information, see How to: Create a Public/Private Key Pair.
In the workflow.xml file, add the public key that you created to the CodeBesideAssembly attribute string.
Cannot Restart Internet Information Services (IIS)
The workflow deployment process must restart IIS to attach the Visual Studio debugger to the Windows SharePoint Services process (w3wp.exe).
Error Messages
The Windows Service Manager cannot be found.
The W3SVC service could not be found.
The status of the W3SVC service cannot be queried.
IIS is not started.
IIS could not be stopped.
Resolution
Ensure that IIS is installed on your computer and that the World Wide Web Publishing Service is started. For more information about how to install IIS, see Installing IIS. For more information about starting services, see How to: Start Services
Cannot Install Workflow Template
This problem can occur when the workflow deployment process cannot activate the feature in the SharePoint Server Web site.
Error Messages
- The feature ID is not valid in the feature.xml file: <file name>.
Resolution
- Open the feature.xml file and verify that the Id attribute of the Feature element contains a valid GUID. For more information about the format of a GUID, see GUID.
To generate a new GUID, use guidgen.exe. For more information, see GUIDGEN Sample: Generates Globally Unique Identifiers (GUIDs).
Feature.xml or workflow.xml Is Invalid
This problem occurs when the workflow deployment process cannot parse the feature or workflow definition file.
Error Messages
Feature.xml is not valid.
Workflow.xml is not valid.
Resolution
Ensure that the feature.xml and workflow.xml files are well-formed. For information about well-formed XML, see XML Glossary.
Ensure that the attributes are set to valid values. Correct any invalid values. If you still receive an error, restart Visual Studio.
Ensure that the names of the elements have not been changed. Correct any invalid element names. If you still receive an error, restart Visual Studio.
Cannot Associate the Workflow with a Library or List in SharePoint
This problem occurs when the workflow deployment process cannot automatically add the workflow template to the library or list specified by the Target Site project property.
Error Messages
Cannot find the workflow template with GUID: <GUID>.
Cannot find the SharePoint list: <list name>.
The workflow ID specified in the Workflow.xml file has an incorrect format.
Resolution
Open the workflow.xml file and verify that the Id attribute of the Workflow element contains a valid GUID. For more information about the format of a GUID, see GUID. To generate a new GUID, use guidgen.exe. For more information, see GUIDGEN Sample: Generates Globally Unique Identifiers (GUIDs).
In the Properties window, verify that the library or list specified by the Target List field identifies a valid library or list on the SharePoint Web site.
Examine the SharePoint diagnostic log files. The default location of these log files is drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. If you cannot find the log files at this location, refer to the diagnostic logging settings in the SharePoint Central Administration Tool. For more information, see the documentation for Office SharePoint Server 2007.
Cannot Find SharePoint Site or SharePoint Server Instance
This problem can occur when the workflow deployment process cannot open the SharePoint site.
Error Messages
SharePoint Server not available.
Cannot find a SharePoint server instance.
Cannot find the specified SharePoint site: <site URL>.
Resolution
Ensure that SharePoint Server is running.
In the Properties window, ensure that the site specified in the Target Site field is a valid SharePoint site.
Examine the SharePoint diagnostic log files. The default location of these log files is drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. If you cannot find the log files at this location, refer to the diagnostic logging settings in the SharePoint Central Administration Tool. For more information, see the documentation for Office SharePoint Server 2007.
For more information, see the Office Online article Troubleshoot common site issues.
Visual Studio Will Not Open the SharePoint Site Until the Project Is Saved
This problem can occur if you create a temporary project and then start the Visual Studio debugger. A temporary project is a project that you can create without having to specify a disk location. For more information, see Temporary Projects.
Error Messages
- The current project must be saved before adding a project.
Resolution
Perform either of the following steps before you start the vsprvs debugger:
Save the project.
Turn off script debugging in Internet Explorer. For information about how to do this, see What should you do about Internet Explorer script errors?
See Also
Tasks
How to: Include Helper Files When you Debug a SharePoint Solution
SharePoint Sequential Workflow Sample
Walkthrough: Creating and Debugging a SharePoint Workflow Solution
How to: Create a SharePoint Workflow Project
Concepts
Debugging SharePoint Workflow Solutions