Skip to content

Commit 1a0e49c

Browse files
committed
Throw exception if a solution reference a not exist csproj.
1 parent 4603a70 commit 1a0e49c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Network/Network.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KeyVault", "..\KeyVault\Key
4242
EndProject
4343
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Compute.Helpers", "..\Compute\Compute.Helpers\Compute.Helpers.csproj", "{52CDB340-C4E6-40AD-A85A-9206DEF7B3CA}"
4444
EndProject
45+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContainerInstance", "..\ContainerInstance\ContainerInstance\ContainerInstance.csproj", "{0E11B67A-1257-40D0-BD33-8315759FDB01}"
46+
EndProject
4547
Global
4648
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4749
Debug|Any CPU = Debug|Any CPU

tools/CreateFilterMappings.ps1

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

151-
$CommonProjectsToIgnore = @("ScenarioTest.ResourceManager", "TestFx", "Tests" )
151+
$CommonProjectsToIgnore = @("ScenarioTest.ResourceManager", "TestFx", "Tests", "Test", "src", "tools" )
152152

153153
$ProjectDependencies = @()
154154
$Content = Get-Content -Path $SolutionPath
@@ -260,7 +260,7 @@ function Get-ModuleFromPath
260260
[string]$FilePath
261261
)
262262

263-
return $FilePath.Replace('/', '\').Split('\src\')[1].Split('\')[0]
263+
return $FilePath.Replace('/', '\').Split('\src\')[-1].Split('\')[0]
264264
}
265265
function Add-CsprojMappings
266266
{
@@ -293,6 +293,10 @@ function Add-CsprojMappings
293293
{
294294
$Values.Add($TempValue) | Out-Null
295295
}
296+
else
297+
{
298+
Throw "${ProjectNameFromSolution}: $ReferencedProject is not found!"
299+
}
296300
}
297301
}
298302
}

0 commit comments

Comments
 (0)