This answer may work better for some people. Ghord's answer works well and passes the workspace back where it can be used in XAML. However, for my purposes, I only want the workspace in my TFS user actions, so I ended up with this alternative ...
public sealed class CustomActivity : CodeActivity { protected override void Execute(CodeActivityContext context) {
Using this method, I should not have activity that simply returns the workspace, and then has to transfer the workspace to other TFS actions. I just get the workspace from my own activity while it works.
John livermore
source share