How to: Manually Configure a Workflow Project
Applies to: SharePoint Foundation 2010
This topic explains how to manually configure a workflow project without using the templates provided by Visual Studio.
To develop a custom Microsoft SharePoint Foundation 2010 workflow in the Visual Studio 2010 Workflow Designer, you must add two references to your workflow project:
A reference to the Microsoft.SharePoint.dll to enable access to the SharePoint Foundation 2010 object model in your code.
A reference to the Microsoft.SharePoint.WorkflowActions.dll to enable access to predefined SharePoint Foundation activities. In addition, you must place those activities in the Toolbox.
For more information about the Windows Workflow Foundation, including using the Visual Studio 2010 Workflow Designer to create workflow solutions, visit the Windows Workflow Foundation Developer Center.
To add the necessary references to the workflow project
In Solution Explorer, right-click References, and then select Add Reference.
On the Browse tab, navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi.
Select Microsoft.SharePoint.dll and Microsoft.SharePoint.WorkflowActions.dll.
To add workflow activities for SharePoint Foundation to the Toolbox
Right-click the Visual Studio Toolbox pane, and then click Choose Items.
Click the Activities tab, and then click Browse. Browse to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\.
Select the Microsoft.SharePoint.WorkflowActions.dll.
You can also get the SharePoint Foundation 2010 workflow activities to appear in your Toolbox pane if you edit your workflow project so that the workflow derives from the SharePointSequentialWorkflowActivity class, rather than the default SequentialWorkflowActivity class. In your workflow code, change the following line of code:
public sealed partial class Workflow1: SequentialWorkflowActivity
public sealed partial class Workflow1: SharePointSequentialWorkflowActivity