Have you ever built a K2 Workflow only to get a really helpful error pointing toward Workflow.targets? A source code file and line number would be a big help – especially when it’s something like the use of an unassigned variable.
The solution isn’t obvious – simply right click on suspect events and view the code (having the XOML file open is fine – no need for individual CS files). When you build with the XOML open you will get two errors for each real error – one will point to Workflow.targets and the other to the actual file (line number and everything).
Jonathan Dickinson works at SourceCode. Everything posted on this blog is his personal opinion and do not necessarily represent the views of his employer or his employer's clients.
The hunt for the error in the Workflow.Targets
Have you ever built a K2 Workflow only to get a really helpful error pointing toward Workflow.targets? A source code file and line number would be a big help – especially when it’s something like the use of an unassigned variable.
The solution isn’t obvious – simply right click on suspect events and view the code (having the XOML file open is fine – no need for individual CS files). When you build with the XOML open you will get two errors for each real error – one will point to Workflow.targets and the other to the actual file (line number and everything).