PowerShellBuild icon indicating copy to clipboard operation
PowerShellBuild copied to clipboard

$ProjectRoot Variable Is Empty - Possible Timing Issue

Open bwright86 opened this issue 6 years ago • 1 comments

I am trying to specify a non-default path for $PSBPreference.Test.RootDir in the psakeBuild.ps1 file. It doesn't appear that the $projectRoot variable is being populated before the Properties block is instantiated.

I can see that the $BHProjectPath is populated at runtime, and $projectRoot is being derived from this value.

But if I output the value of $projectRoot during runtime, from inside the Properties block, it is empty.

Could you take a look and see if I am correct about the timing issue above?

bwright86 avatar Sep 13 '19 14:09 bwright86

Can you give an example of how you're calling this? A repro case would help us identify the root cause.

HeyItsGilbert avatar Mar 01 '25 04:03 HeyItsGilbert