Skip to content

Commit d1789db

Browse files
committed
Merge
2 parents 05d93b1 + df780af commit d1789db

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

Build-Toolkit-Components.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Specifies the date for versioning in 'YYMMDD' format. The default value is the current date.
1616
1717
.PARAMETER PreviewVersion
18-
Specifies the preview version to use if packaging is enabled. Appended with a dash after the version number (formatted Version-PreviewVersion). This parameter is required when NupkgOutput is supplied.
18+
Specifies the preview version to use if packaging is enabled. Appended with a dash after the version number (formatted Version-PreviewVersion). This parameter is optional.
1919
2020
.PARAMETER NupkgOutput
2121
Specifies the output directory for .nupkg files. This parameter is optional. When supplied, the components will also be packed and nupkg files will be output to the specified directory.
@@ -110,9 +110,8 @@ if ($Components -eq @('all')) {
110110
$Components = @('**')
111111
}
112112

113-
# Check if NupkgOutput is supplied without PreviewVersion
114-
if ($NupkgOutput -and -not $PreviewVersion) {
115-
throw "PreviewVersion is required when NupkgOutput is supplied."
113+
if ($ExcludeComponents) {
114+
$Components = $Components | Where-Object { $_ -notin $ExcludeComponents }
116115
}
117116

118117
# Use the specified MultiTarget TFM and WinUI version

Build-Toolkit-Gallery.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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.
104103
if ($Components -notcontains 'SettingsControls') {
105104
$Components += 'SettingsControls'
106105
}

MultiTarget/GenerateAllProjectReferences.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

MultiTarget/WinUI.Extra.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
</PropertyGroup>
1010

1111
<PropertyGroup Condition="'$(IsWinAppSdk)' == 'true' OR '$(IsUwp)' == 'true'">
12+
<!--
13+
For net5.0+ targets, TargetPlatformMinVersion was renamed to SupportedOSPlatformVersion. See https://github.com/dotnet/designs/pull/157
14+
15+
The dotnet SDK uses the TargetPlatformVersion property to provide a default SupportedOSPlatformVersion value if none is explicitly provided.
16+
See https://github.com/dotnet/designs/blob/bba3216250cb29b0063bac3ebb57a542ee21ad4f/accepted/2020/minimum-os-version/minimum-os-version.md?plain=1#L73C27-L73C48
17+
-->
1218
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
19+
<SupportedOSPlatformVersion>$(TargetPlatformMinVersion)</SupportedOSPlatformVersion>
1320
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
1421
<WindowsSdkPackageVersion>10.0.22621.37-preview</WindowsSdkPackageVersion>
1522
</PropertyGroup>
@@ -31,6 +38,7 @@
3138

3239
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
3340
<RuntimeIdentifiers Condition="8 > $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)'))">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
41+
<WindowsSdkPackageVersion>10.0.22621.37-preview</WindowsSdkPackageVersion>
3442
</PropertyGroup>
3543

3644
<PropertyGroup Condition="'$(IsUno)' == 'true'">

0 commit comments

Comments
 (0)