custom activity libraries - compile time validation issue
manu
there is a quite annoying problem with custom activity libraries in beta 2 of the windows workflow foundation.
compiling activity libraries with ActivityValidators yields errors like Activity ‘foo’ validation failed: Property ‘bar’ is not set.
according to [1], beta 1 only ran the validators if the activity was part of a workflow. now beta 2 also runs the validators at compile time, which obviously can’t work for properties you just don’t know how to set before design time.
now you can either see if the activity is actually used in a workflow by simply checking it for a parent before validation:
or you make your library an ordinary c# project by removing the
tag from your library’s build file.
[1] msdn wwf forum
tags:
windows workflow foundation, wwf, activity library, ActivityValidator, Activity validation, ActivityLibraryPosted in windows workflow foundation |
|

