Skip to content

Commit 088712d

Browse files
committed
Fixed an issue where Build-Toolkit-Gallery script wasn't working in Labs
1 parent e661644 commit 088712d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Build-Toolkit-Gallery.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ if ($ExcludeComponents) {
9494
$Components = $Components | Where-Object { $_ -notin $ExcludeComponents }
9595
}
9696

97-
# Certain Components are required to build the gallery app.
98-
# Add them if not already included.
97+
# Certain ProjectReferences should always be generated (are required to build gallery) if csproj is available.
9998
if ($Components -notcontains 'SettingsControls') {
10099
$Components += 'SettingsControls'
101100
}

MultiTarget/GenerateAllProjectReferences.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ foreach ($componentName in $Components) {
2828
continue;
2929
}
3030

31+
# Don't generate project reference if component isn't available
32+
if (!(Test-Path "$PSScriptRoot/../../components/$componentName/")) {
33+
continue;
34+
}
35+
3136
# Find all components source csproj (when wildcard), or find specific component csproj by name.
3237
foreach ($componentPath in Get-Item "$PSScriptRoot/../../components/$componentName/") {
38+
$componentName = $componentPath.BaseName;
3339
Write-Output "Generating project references for component $componentName at $componentPath";
3440

3541
# Find source and sample csproj files

0 commit comments

Comments
 (0)