I am working through the Getting Started Tutorial for WF45 and have run into a problem that looks to have been experience by other people, but not in the same way that I am experiencing it. I am hoping that someone else has a solution for me.
When I work through the Tutorial, all is good till I have to run it from the workflow host. At that point the instantiation of the workflow fail and returns the following message.
"Expression Activity type 'CSharpValue`1' requires compilation in order to run. Please ensure that the workflow has been compiled."
I have tried downloading the source from Windows Workflow Foundation (WF45) - Getting Started Tutorial in case I had missed a step but the error still persists.
Reading online it seems that workflows with embedded C# expressions need to be complied, but as I understand it this happens by default when using VS2012 and the workflow designer? I have tried to implement the CompileExpressions method found here but that did not help. I did read that there was a problem during the pre-release version where C# expressions caused this problem, and yet VB projects worked. Testing this, I see that I am suffering this exact case. The VB tutorial runs fine, but the C# version fails with this exception.
Furthermore and dare I mention it: This is not a problem on my colleague's machine, so I think it is a configuration problem on my machine...
Update & dodge fix:
So, I have managed to fix the problem, although I am not happy with the solution and would love to hear if anyone has a decent reason for this happening.
My fix was to replace my Microsoft.Common.targets file in the \Framework\v4.0.30319 folder with my colleague's version of the same file. This has solved the problem. What else it has broken remains to be seen...