@@ -161,13 +161,23 @@ function Add-FunctionalTests {
161161 }
162162}
163163
164+ function outputLocation { return (get-location )}
165+
164166function UpdateRootNamespace ($projectName , $testProjectPath , $customPropsFile = $null ) {
167+ $loc = outputLocation
168+ Write-Debug " Location: $loc "
169+ Write-Debug " testProjectPath: $testProjectPath "
170+
171+ # Convert to absolute path
172+ $fullTestPath = " $loc \$testProjectPath "
173+ Write-Verbose " Convert '$fullTestPath ' to absolute '$fullTestPath '."
174+
165175 $i = 0 ;
166- $tmpFile = " $testProjectPath .tmp"
167- foreach ($line in [System.IO.File ]::ReadLines($testProjectPath )) {
176+ $tmpFile = " $fullTestPath .tmp"
177+ foreach ($line in [System.IO.File ]::ReadLines($fullTestPath )) {
168178 if ($i -eq 1 ) {
169179 if ($customPropsFile ) {
170- Write-Verbose " Adding '$customPropsFile ' to '$testProjectPath '."
180+ Write-Verbose " Adding '$customPropsFile ' to '$fullTestPath '."
171181 Add-Content - Path $tmpFile - Value " <Import Project="" $customPropsFile "" />"
172182 Add-Content - Path $tmpFile - Value " "
173183 }
@@ -183,12 +193,12 @@ function UpdateRootNamespace($projectName, $testProjectPath, $customPropsFile =
183193 }
184194
185195 # Delete original csproj
186- Write-Verbose " Deleting '$testProjectPath '."
187- Remove-Item –path $testProjectPath
196+ Write-Verbose " Deleting '$fullTestPath '."
197+ Remove-Item –path $fullTestPath
188198
189199 # Rename .csproj.tmp to .csproj
190- Write-Verbose " Renaming '$tmpFile ' to '$testProjectPath '."
191- Move-Item - Path $tmpFile - Destination $testProjectPath
200+ Write-Verbose " Renaming '$tmpFile ' to '$fullTestPath '."
201+ Move-Item - Path $tmpFile - Destination $fullTestPath
192202}
193203function BuildSolution ($solutionName ) {
194204 if ($solutionName ) {
0 commit comments