How to get the immediate parent of BuildDetail.DropLocation?
-
Thursday, April 26, 2012 6:11 PM
What I need is the immediate parent of the BuildDetail.DropLocation, which I assume would be named BuildDetail.DropLocationParent (not "Root").
If DropLocationRoot doesn't contain the parent, then how do I get the parent?
DadCat
All Replies
-
Thursday, April 26, 2012 6:20 PM
PatrickString parent = System.IO.Path.GetDirectoryName(build.DropLocation);
-
Thursday, April 26, 2012 6:31 PM
Maybe I should have been more precise in my question...
I need to do this in an InvokeProcess activity, not in code.
Or is there a way to specify the code "in-line" within one of the properties of InvokeProcess? (examples would be nice)
BTW: of all the technologies involved with the WPF app I'm working on, the build automation is by far the most poorly documented!
The MSDN doc for BuildDetail.DropLocationRoot has no description of what it is, and zero examples (as is also the case with almost all the build automation classes).
DadCat
-
Thursday, April 26, 2012 7:07 PM
You can use VB expressions in-line in a workflow definition, but this is not specific to the build automation component of TFS. The .NET workflow library supports this natively. You should probably begin searching for help on writing workflow XAML activities as that is where you appear to be stuck. You can find examples of using variables and visual basic expressions by looking through the XAML files which ship with the build product (DefaultTemplate.xaml and UpgradeTemplate.xaml).
Patrick
- Marked As Answer by DadCat Thursday, May 03, 2012 3:02 PM

