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?
Powershell

Avatar of undefined
Last Comment
josephh610

8/22/2022 - Mon
Qlemo

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
josephh610

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Qlemo

So you used the environment variables, or provide parameters?
josephh610

ASKER
Visual studio build has variables that are available during build time.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
josephh610

ASKER
Figured out solution myself.