I am creating a TFS2013 custom activity using the CodeActivity base class.
Here is the overload I am working with...
protected override void Execute(CodeActivityContext context)
With a CodeActivityContext, how does one get the build directory (where the files get dropped before being built by MSBuild)? I need to modify a file in the build directory path prior to MSBuild taking over.
You can pass in a string to your activity
[RequiredArgument]
public InArgument<string> DirectoryToSearch { get; set; }
In previous versions of TFS you could just Pass in SourcesDirectory or BinariesDirectory
In 2013 the default objects for SourcesDirectory and BinariesDirectory have been withdrawn.
you can now get these from the
Microsoft.TeamFoundation.Build.Activities.Extensions.WellKnownEnvironmentVariables object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With