tfstfsbuildworkflow-activity

TFS 2013 environment variables always empty


I've defined custom arguments in my xaml build script and provided values:

enter image description here

Then In my build I get the following instead of actual TF_BUILD_BUILDDIRECTORY. This is the string that writes: "dotCover Report..."

String.Format("dotCover Report Path: {0}\{1}", DotCoverReportPath, DotCoverReportFileName)

It's not translating to actual BUILDDIRECTORY path. What am I doing wrong? I've hit "refresh" several times and still no go. I wanted to get "C:\temp..." etc

enter image description here


Solution

  • Possible duplicate with this case TFS How to GetEnvironmentVariable value. You can't use $TF_BUILD_BUILDDIRECTORY in a custom build process.

    Please refer more detailed info about how to use it from this blog Using Environment Variables in Visual Studio 2013 and TFS 2013