Here's what I'm trying to achieve: I want multiple TFS build configurations, which of which define variable, let's call it foo, which I need to be able to pass as the argument to a PowerShell script which is executed after a successful build. Each build configuration will define a different value for foo.
I know that this is dead simple in TFS 2013 which lets you specify a script to execute after a successful build. Unfortunately I'm using TFS 2012 at the moment and it is not in my gift to upgrade.
The easiest route I could think of to achieve the desired effect is to pass a parameter in the MSBuild Arguments section of the build configuration (/p:foo=myValue ?) and use that parameter in a task in a <Target Name="AfterBuild"> section in the .csproj file for my project.
My question is basically this: what goes in the <Target Name="AfterBuild"> section to invoke the command myscript.ps1 "myValue"?