Do I need to rewrite statemachine workflow when upgrade from Visual studio2005 to VS2012?


  • I'm trying to upgrade a project from VS2005 to VS2012 professional. The old computer is 32 bit and the new one is 64 bit.

    There are some state machine workflows to be called by a website. It cannot get the right results as I want.

    The statement

    WorkflowRuntime wr Application["WorkflowRuntime"as WorkflowRuntime;

    ExternalDataExchangeService dataService = wr.GetService<ExternalDataExchangeService>();

    always return null and cause System.NullReferenceException.

    But it's fine to run on the old computer with VS2005. I searched a post

    It seems the state machine workflow is totally different from VS2005 to VS2012. So does that mean I need to rewrite the workflow part follow the instruction of

    Or just change the compilation information in web.config from Version= to Version= or any some simple way to get around it?

    And here comes another question. There will be a GUID assigned for each workflow and this information is saved into SQL server database table. I guess the GUID can indicate which state the workflow goes into. Can I still track the state information by the old GUID if I change the code for VS2012?

    If there is any concept error in my expression, please point it out, thanks very much for your help.

    Wednesday, June 19, 2013 2:23 AM