@@ -161,13 +161,23 @@ function Add-FunctionalTests {
161
161
}
162
162
}
163
163
164
+ function outputLocation { return (get-location )}
165
+
164
166
function 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
+
165
175
$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 )) {
168
178
if ($i -eq 1 ) {
169
179
if ($customPropsFile ) {
170
- Write-Verbose " Adding '$customPropsFile ' to '$testProjectPath '."
180
+ Write-Verbose " Adding '$customPropsFile ' to '$fullTestPath '."
171
181
Add-Content - Path $tmpFile - Value " <Import Project="" $customPropsFile "" />"
172
182
Add-Content - Path $tmpFile - Value " "
173
183
}
@@ -183,12 +193,12 @@ function UpdateRootNamespace($projectName, $testProjectPath, $customPropsFile =
183
193
}
184
194
185
195
# Delete original csproj
186
- Write-Verbose " Deleting '$testProjectPath '."
187
- Remove-Item –path $testProjectPath
196
+ Write-Verbose " Deleting '$fullTestPath '."
197
+ Remove-Item –path $fullTestPath
188
198
189
199
# 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
192
202
}
193
203
function BuildSolution ($solutionName ) {
194
204
if ($solutionName ) {
0 commit comments