Skip to content

Commit 2aa2a11

Browse files
committed
Throw exception if a solution reference a not exist csproj.
1 parent 401a1a2 commit 2aa2a11

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/CreateFilterMappings.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ function Add-ProjectDependencies
148148
[string]$SolutionPath
149149
)
150150

151-
$CommonProjectsToIgnore = @("ScenarioTest.ResourceManager", "TestFx", "Tests", "Test", "src", "tools" )
152-
151+
$CommonProjectsToIgnore = @("ScenarioTest.ResourceManager", "TestFx", "Tests" )
153152
$ProjectDependencies = @()
154153
$Content = Get-Content -Path $SolutionPath
155-
$Content | Select-String -Pattern "`"[a-zA-Z0-9.]*`"" | ForEach-Object { $_.Matches[0].Value.Trim('"') } | Where-Object { $CommonProjectsToIgnore -notcontains $_ } | ForEach-Object { $ProjectDependencies += $_ }
154+
$Content | Select-String -Pattern "[`\`/]*[a-zA-Z0-9.]*.csproj" | ForEach-Object { $_.Matches[0].Value.Replace(".csproj", "") } | Where-Object { $CommonProjectsToIgnore -notcontains $_ } | ForEach-Object { $ProjectDependencies += $_ }
156155
$Mappings[$SolutionPath] = $ProjectDependencies
157156
return $Mappings
158157
}

0 commit comments

Comments
 (0)