WF 4.5 and Code Contracts: Slide Decks and Code

I’d like to thank all those who attended yesterday’s sessions at the Israeli .NET Developer User Group. I had a good time delivering the sessions, and I hope you enjoyed them as well.

What’s New in Windows Workflow Foundation (WF) 4.5?

Sample code for the session can be found here.

Enhance Your Code Quality with Code Contracts

Sample code for the session can be found here.

If you attended the session and have an open question, feel free to ask. See you next time!


  1. Eran, I am new to WF and considering it for my application. Thanks for your WF 4.5 slide show. I just went thru the “Getting Started” tutorial Microsoft provides. They explain that Dynamic Updating you described in your slide show. But I have a serious concern about it and was wondering whether you could clarify something. From what I can see from the Getting Started tutorial, to upgrade workflows, you must create an updater project, and meticulously hand-code the changes to workflows. You do not get to have any of the benefits of the workflow designer. For complex workflow changes, this seems very tedious and error-prone. It looks to me like this WF is really only suited to applications where a) you don’t need persistence, or b) you use persistence but you WANT the older saved instances to run with the original rules they were built with.
    It seems wholly unsuited to scenarios where you want to easily and reliably change the rules and have all in-flight instances of the workflow follow the new rules.

    Let me know if I’m missing something here.

    BTW, on the other topic, Code Contracts, I love them and wish more people would embrace them.

    Thank you


  2. Hi David,
    Thanks for your comment! 🙂

    Regarding the WF dynamic updates – you CAN apply a dynamic update using the WF designer, just not as straight forward as we would like using Visual Studio.
    In order to apply a dynamic update to an existing WF via the designer, you must re-host the designer within your own application, load the XAML and prepare it for update. When your are done editing the WF with the designer just get the update mapping and apply it as usual. Not very streamlined but works… Unfortunately I couldn’t find a complete example of this, but take a look at Instead of performing the changes by code use a re-hosted designer and that is it.


    1. Thank you for the info. I will continue to look for someone who has applied this or another solution to address this challenge.


Have an Opinion?