Microsoft KB Archive/926504
Article ID: 926504
Article Last Modified on 11/24/2006
- Windows Workflow Foundation
You compile a Microsoft Windows Workflow Foundation solution with one rule in the code and the other defined in the ".rules" file. In this scenario, you may receive a compilation error that resembles the following:
This problem occurs because at build time there is no rule defined for the IfElse activity.
To work around this problem, use one of the following method.
Specify a placeholder rule at design time, and replace with the desired rule by using code at runtime,
Use a code condition. The code condition is based on the same application logic that will be used to define the rule which is defined at runtime.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Steps to reproduce the problem
- Create a Windows Workflow Foundation project in Microsoft Visual Studio 2005.
Note Visual Studio 2005 Extensions for Windows Workflow Foundation must be installed on the computer.
- Add two activities in the project, and then drop two IfElse controls in the two activities.
- Set the rule of one IfElse branch in the code.
- Set the rule of another IfElse branch in the .rules file by using the Rule Set Editor dialog box.
- Compile the project.
You may receive the compilation error that is described in the "Symptoms" section.
Keywords: kbtshoot kbprb KB926504