Failure to display pageflow designer

Dec 5, 2007 at 6:57 PM
I followed Add PageFlow Project recipe to create a PageFlow project. However, When I tried to open the PageFlow1.cs class, I got an exception message:

Error 1 The type initializer for 'Microsoft.Practices.PageFlow.WorkflowFoundation.Activities.PageFlow' threw an exception. 0 0

I have added references to the project as required:

• Microsoft.Practices.PageFlow.dll
• Microsoft.Practices.PageFlow.WorkflowFoundation.dll
• Microsoft.Practices.PageFlow.Storage.EnterpriseLibrary.dll
• Microsoft.Practices.EnterpriseLibrary.Data.dll

What else I am missing?
Dec 6, 2007 at 1:39 AM
I find out a way to solve the problem. The problem is, I think, the PageFlow class defined in Microsoft.Practices.PageFlow.WorkflowFoundation.dll depends on Microsoft.Workflow.VSDesigner.dll in VS. I don't see this file is within the folder where former one sits. I searched for this file in my PC and copied the file for the folder. Then I re-open the VS, and the PageFlow1.cs can be opened in VS designer without error.
Dec 6, 2007 at 3:33 PM

The WCSF Knowledge Base (Known Issues / Fixes category), contains a post on how to fix this problem:

Create a .reg file like the one below.

Windows Registry Editor Version 5.00
@="C:\\Program Files\\Reference Assemblies\\WCSF\\"

Change the value of the "@" (Defualt) key to the directory where your WCSF assebmlies are located. Save the file. Close all VS instances. Apply the .reg file. Open VS and try to open a pageflow now.


Sebastian Iacomuzzi