File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff 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.
9998if ($Components -notcontains ' SettingsControls' ) {
10099 $Components += ' SettingsControls'
101100}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments