I create a state machine workflow with WSPBuilder as follows:
WSPBuilder Project with Workflow ->Add new item -> WSPBuilder, State Machine Workflow with Feature -> Site Scope -> .NET v3.0
The workflow builds until the time that the <workflow>.rules file is generated (at the time of defining a condition, eg for an ifelse branch).
At thise point I get the following error:
"Resource identifier '<namespace>.<class>' has already been used in this assembly"
After extensive trial and error (on multiple boxes/projects) I have discovered that:
- Project will build if either the <workflow>.rules or <workflow>.layout files are deleted before compilation (but of course the workflow has errors when attempting to run in sharepoint)
- The issue does not appear to lie in the project file.
- When building the WSPBuilder project the build command includes "/resource:WorkflowCode\<featurename>.layout <namespace>.<class> /resource"WorkflowCode\<featurename>.rules, <namespace>.<class>".
Both the .layout and .rules files are using identical namespace and class. When building a state machine workflow project with a standard sharepoint workflow project (outside of a WSPBuilder template) the command does not include the namespace and class.
eg "/resource:WorkflowCode\<featurename>.layout /resource"WorkflowCode\<featurename>.rules" and builds without errors.
By running the csc.exe build command on the command line with the namespace and class omitted I can get the assembly to build.
Sequential workflows build correctly, using /resource"WorkflowCode\<featurename>.rules, <namespace>.<class>".
Have you seen this before? Is there a way we can get these to build?
Appreciate your response and otherwise very helpful tool,
(VS2008 with WSPBuilder 105)