Link to home
Create AccountLog in
Avatar of josephh610
josephh610

asked on

What is the best way to pass variables from Visual studio build definition to powershell running in post build section

What is the best way to pass variables from Visual studio build definition to powershell running in post build section.
I have a build running in visual studio 2013. I have in the post build section running a powershell script and i want it to be able to see the drop location also maybe even the bin directory. Since each build creates a new dynamic directory how does that variable that is used in the build get exposed to powershell post build/ compile?
Avatar of Qlemo
Qlemo
Flag of Germany image

There are a lot of predefined variables you can provide as argument - did you take a look thru the drop-down list? You can use the vars as positional or named parameters, Whatever you prefer, in PowerShell.
ASKER CERTIFIED SOLUTION
Avatar of josephh610
josephh610

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
So you used the environment variables, or provide parameters?
Avatar of josephh610
josephh610

ASKER

Visual studio build has variables that are available during build time.
Figured out solution myself.