File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ if ($ExcludeComponents) {
9999 $Components = $Components | Where-Object { $_ -notin $ExcludeComponents }
100100}
101101
102- # Certain Components are required to build the gallery app.
103- # Add them if not already included.
102+ # Certain ProjectReferences should always be generated (are required to build gallery) if csproj is available.
104103if ($Components -notcontains ' SettingsControls' ) {
105104 $Components += ' SettingsControls'
106105}
Original file line number Diff line number Diff line change @@ -30,8 +30,16 @@ foreach ($componentName in $Components) {
3030 continue ;
3131 }
3232
33+ # Don't generate project reference if component isn't available
34+ if (! (Test-Path " $PSScriptRoot /../../components/$componentName /" )) {
35+ continue ;
36+ }
37+
3338 # Find all components source csproj (when wildcard), or find specific component csproj by name.
3439 foreach ($componentPath in Get-Item " $PSScriptRoot /../../components/$componentName /" ) {
40+ $componentName = $componentPath.BaseName ;
41+ Write-Output " Generating project references for component $componentName at $componentPath " ;
42+
3543 # Find source and sample csproj files
3644 $componentSourceCsproj = Get-ChildItem $componentPath / src/* .csproj - ErrorAction SilentlyContinue;
3745 $componentSampleCsproj = Get-ChildItem $componentPath / samples/* .csproj - ErrorAction SilentlyContinue;
You can’t perform that action at this time.
0 commit comments