I am working on a WF project which has many processes and code activities in it. The project takes too long to build (20-30 times more than any other project in the solution).
I've asked google about this, but there seems to be no information.
Please, how can I reduce the build time of a Workflow Foundation project?
The main part is probably that all XAML based composite activities get validated during build. That means, they get instantiated!
You can turn that off with an undocumented setting in the csproj file:
<SkipWorkflowValidation>true</SkipWorkflowValidation>
<DisableWorkflowCompiledExpressions>true</DisableWorkflowCompiledExpressions>
This setting must be added to all configuration sections (the relevant elements, typically, you’ll want do to this in all the configurations).
The project file (csproj or vbproj extension) can be edited in Visual Studio by following these steps:
Once you are done editing the file, you can right-click on the project in Solution Explorer and select “Reload Project”.
Try that and watch the build time. But be aware, this will skip some tests during build that might be valuable...