Skip to content

Commit 1bdf731

Browse files
committed
ProjectIdentifiers are now MultiTargetIdentifiers and are not used by app heads
1 parent a85b489 commit 1bdf731

14 files changed

+45
-157
lines changed

MultiTarget/Library.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<Import Project="$(ToolingDirectory)\MultiTarget\MultiTargetToTargetFramework.props" />
1414

1515
<!-- Enable project identifiers -->
16-
<Import Project="$(ToolingDirectory)\MultiTarget\ProjectIdentifiers.props" />
16+
<Import Project="$(ToolingDirectory)\MultiTarget\WinUI.TargetVersion.props" />
17+
<Import Project="$(ToolingDirectory)\MultiTarget\MultiTargetIdentifiers.props" />
1718
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
1819

1920
<!-- Add platform package dependencies -->

MultiTarget/ProjectIdentifiers.props renamed to MultiTarget/MultiTargetIdentifiers.props

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@
5050

5151
<IsUno Condition="'$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true' OR '$(IsDroid)' == 'true' OR '$(IsMacOS)' == 'true' OR '$(IsiOS)' == 'true'">true</IsUno>
5252

53-
<!-- THIS AREA MODIFIED BY SCRIPTS -->
54-
<PackageIdVariant>Uwp</PackageIdVariant>
55-
<WinUIMajorVersion>2</WinUIMajorVersion>
56-
<!-- END SCRIPT AREA -->
57-
5853
<HasWinUI Condition="'$(IsUwp)' == 'true' OR '$(IsWinAppSdk)' == 'true' OR '$(IsUno)' == 'true'">true</HasWinUI>
5954
</PropertyGroup>
6055
</Project>

MultiTarget/UseUnoWinUI.ps1

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ function ApplyWinUISwap([string] $filePath) {
2828
$fileContents = $fileContents -replace '<WinUIMajorVersion>2</WinUIMajorVersion>', '<WinUIMajorVersion>3</WinUIMajorVersion>';
2929
$fileContents = $fileContents -replace '<PackageIdVariant>Uwp</PackageIdVariant>', '<PackageIdVariant>WinUI</PackageIdVariant>';
3030
$fileContents = $fileContents -replace 'Uno.UI', 'Uno.WinUI';
31-
32-
$fileContents = $fileContents -replace '\$\(DefineConstants\);WINUI2;', '$(DefineConstants);WINUI3;WINAPPSDK;';
3331
}
3432

3533
if ($winUIMajorVersion -eq "2") {
3634
$fileContents = $fileContents -replace '<WinUIMajorVersion>3</WinUIMajorVersion>', '<WinUIMajorVersion>2</WinUIMajorVersion>';
3735
$fileContents = $fileContents -replace '<PackageIdVariant>WinUI</PackageIdVariant>', '<PackageIdVariant>Uwp</PackageIdVariant>';
3836
$fileContents = $fileContents -replace 'Uno.WinUI', 'Uno.UI';
39-
40-
$fileContents = $fileContents -replace '\$\(DefineConstants\);WINUI3;WINAPPSDK;', '$(DefineConstants);WINUI2;';
4137
}
4238

4339
Set-Content -Force -Path $filePath -Value $fileContents;
@@ -47,8 +43,8 @@ function ApplyWinUISwap([string] $filePath) {
4743
Write-Output "Switching to WinUI $winUIMajorVersion";
4844

4945
ApplyWinUISwap $PSScriptRoot/../ProjectHeads/App.Head.Uno.props
50-
ApplyWinUISwap $PSScriptRoot/Uno.props
51-
ApplyWinUISwap $PSScriptRoot/ProjectIdentifiers.props
46+
ApplyWinUISwap $PSScriptRoot/PackageReferences/Uno.props
47+
ApplyWinUISwap $PSScriptRoot/WinUI.TargetVersion.props
5248

5349
if ($allowGitChanges.IsPresent) {
5450
Write-Warning "Changes to the default Uno package settings in Labs can now be committed.`r`nRun this command again without -allowGitChanges to disable committing further changes.";

MultiTarget/WinUI.TargetVersion.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- THIS AREA MODIFIED BY SCRIPTS -->
4+
<PackageIdVariant>Uwp</PackageIdVariant>
5+
<WinUIMajorVersion>2</WinUIMajorVersion>
6+
<!-- END SCRIPT AREA -->
7+
</PropertyGroup>
8+
</Project>

ProjectHeads/AllComponents/Tests.Uwp/CommunityToolkit.Tests.Uwp.csproj

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,12 @@
44

55
<PropertyGroup>
66
<IsDeployableHead>true</IsDeployableHead>
7-
<IsUno>false</IsUno>
8-
<IsWasm>false</IsWasm>
9-
<IsWasmHead>false</IsWasmHead>
10-
<IsWasmLib>false</IsWasmLib>
11-
<IsDroid>false</IsDroid>
12-
<IsMacOS>false</IsMacOS>
13-
<IsiOS>false</IsiOS>
147
<IsUwp>true</IsUwp>
15-
<IsWinAppSdk>false</IsWinAppSdk>
16-
<IsWpf>false</IsWpf>
17-
<IsWpfHead>false</IsWpfHead>
18-
<IsWpfLib>false</IsWpfLib>
19-
<IsGtk>false</IsGtk>
20-
<IsGtkHead>false</IsGtkHead>
21-
<IsGtkLib>false</IsGtkLib>
8+
<HasWinUI>true</HasWinUI>
9+
<WinUIMajorVersion>2</WinUIMajorVersion>
2210
</PropertyGroup>
2311

2412
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />
25-
<Import Project="$(ToolingDirectory)\MultiTarget\ProjectIdentifiers.props" />
2613
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
2714

2815
<Import Project="$(ToolingDirectory)\ProjectHeads\Tests.Head.Uwp.props" />

ProjectHeads/AllComponents/Tests.WinAppSdk/CommunityToolkit.Tests.WinAppSdk.csproj

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,13 @@
22

33
<PropertyGroup>
44
<IsDeployableHead>true</IsDeployableHead>
5-
<IsUno>false</IsUno>
6-
<IsWasm>false</IsWasm>
7-
<IsWasmHead>false</IsWasmHead>
8-
<IsWasmLib>false</IsWasmLib>
9-
<IsDroid>false</IsDroid>
10-
<IsMacOS>false</IsMacOS>
11-
<IsiOS>false</IsiOS>
12-
<IsUwp>false</IsUwp>
135
<IsWinAppSdk>true</IsWinAppSdk>
14-
<IsWpf>false</IsWpf>
15-
<IsWpfHead>false</IsWpfHead>
16-
<IsWpfLib>false</IsWpfLib>
17-
<IsGtk>false</IsGtk>
18-
<IsGtkHead>false</IsGtkHead>
19-
<IsGtkLib>false</IsGtkLib>
6+
<HasWinUI>true</HasWinUI>
7+
<HasWinUI>true</HasWinUI>
8+
<WinUIMajorVersion>3</WinUIMajorVersion>
209
</PropertyGroup>
2110

2211
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />
23-
<Import Project="$(ToolingDirectory)\MultiTarget\ProjectIdentifiers.props" />
2412
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
2513

2614
<Import Project="$(ToolingDirectory)\ProjectHeads\Tests.Head.WinAppSdk.props" />

ProjectHeads/AllComponents/Uwp/CommunityToolkit.App.Uwp.csproj

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,17 @@
44
<Import Project="$([MSBuild]::GetPathOfFileAbove(directory.build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(directory.build.props))')" />
55

66
<PropertyGroup>
7-
<IsAllExperimentHead>true</IsAllExperimentHead>
87
<IsDeployableHead>true</IsDeployableHead>
98
<IsUwp>true</IsUwp>
10-
<IsWinAppSdk>false</IsWinAppSdk>
11-
<IsUno>false</IsUno>
12-
<IsWasm>false</IsWasm>
13-
<IsWasmHead>false</IsWasmHead>
14-
<IsWasmLib>false</IsWasmLib>
15-
<IsDroid>false</IsDroid>
16-
<IsMacOS>false</IsMacOS>
17-
<IsiOS>false</IsiOS>
18-
<IsWpf>false</IsWpf>
19-
<IsWpfHead>false</IsWpfHead>
20-
<IsWpfLib>false</IsWpfLib>
21-
<IsGtk>false</IsGtk>
22-
<IsGtkHead>false</IsGtkHead>
23-
<IsGtkLib>false</IsGtkLib>
249
<HasWinUI>true</HasWinUI>
10+
<WinUIMajorVersion>2</WinUIMajorVersion>
11+
12+
<IsAllExperimentHead>true</IsAllExperimentHead>
2513
</PropertyGroup>
2614

2715
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />
28-
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
2916
<Import Project="$(ToolingDirectory)\ProjectHeads\App.Head.Uwp.props" />
17+
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
3018
<Import Project="$(ToolingDirectory)\MultiTarget\Generated\*.props" />
3119

3220
<PropertyGroup>

ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web" TreatAsLocalProperty="TargetFramework">
22

33
<PropertyGroup>
4-
<IsAllExperimentHead>true</IsAllExperimentHead>
54
<IsDeployableHead>true</IsDeployableHead>
65
<IsUno>true</IsUno>
76
<IsWasm>true</IsWasm>
87
<IsWasmHead>true</IsWasmHead>
9-
<IsWasmLib>false</IsWasmLib>
10-
<IsDroid>false</IsDroid>
11-
<IsMacOS>false</IsMacOS>
12-
<IsiOS>false</IsiOS>
13-
<IsUwp>false</IsUwp>
14-
<IsWinAppSdk>false</IsWinAppSdk>
15-
<IsWpf>false</IsWpf>
16-
<IsWpfHead>false</IsWpfHead>
17-
<IsWpfLib>false</IsWpfLib>
18-
<IsGtk>false</IsGtk>
19-
<IsGtkHead>false</IsGtkHead>
20-
<IsGtkLib>false</IsGtkLib>
8+
<HasWinUI>true</HasWinUI>
9+
10+
<IsAllExperimentHead>true</IsAllExperimentHead>
2111
</PropertyGroup>
2212

2313
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />
14+
<Import Project="$(ToolingDirectory)\MultiTarget\WinUI.TargetVersion.props" />
2415
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
2516
<Import Project="$(ToolingDirectory)\MultiTarget\Generated\*.props" />
2617
<Import Project="$(ToolingDirectory)\ProjectHeads\App.Head.Wasm.props" />

ProjectHeads/AllComponents/WinAppSdk/CommunityToolkit.App.WinAppSdk.csproj

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<IsAllExperimentHead>true</IsAllExperimentHead>
54
<IsDeployableHead>true</IsDeployableHead>
6-
<IsUno>false</IsUno>
7-
<IsWasm>false</IsWasm>
8-
<IsWasmHead>false</IsWasmHead>
9-
<IsWasmLib>false</IsWasmLib>
10-
<IsDroid>false</IsDroid>
11-
<IsMacOS>false</IsMacOS>
12-
<IsiOS>false</IsiOS>
13-
<IsUwp>false</IsUwp>
145
<IsWinAppSdk>true</IsWinAppSdk>
15-
<IsWpf>false</IsWpf>
16-
<IsWpfHead>false</IsWpfHead>
17-
<IsWpfLib>false</IsWpfLib>
18-
<IsGtk>false</IsGtk>
19-
<IsGtkHead>false</IsGtkHead>
20-
<IsGtkLib>false</IsGtkLib>
6+
<HasWinUI>true</HasWinUI>
7+
<WinUIMajorVersion>3</WinUIMajorVersion>
8+
9+
<IsAllExperimentHead>true</IsAllExperimentHead>
2110
</PropertyGroup>
2211

2312
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />

ProjectHeads/SingleComponent/Tests.Uwp/ProjectTemplate.Tests.Uwp.csproj

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,12 @@
44

55
<PropertyGroup>
66
<IsDeployableHead>true</IsDeployableHead>
7-
<IsUno>false</IsUno>
8-
<IsWasm>false</IsWasm>
9-
<IsWasmHead>false</IsWasmHead>
10-
<IsWasmLib>false</IsWasmLib>
11-
<IsDroid>false</IsDroid>
12-
<IsMacOS>false</IsMacOS>
13-
<IsiOS>false</IsiOS>
147
<IsUwp>true</IsUwp>
15-
<IsWinAppSdk>false</IsWinAppSdk>
16-
<IsWpf>false</IsWpf>
17-
<IsWpfHead>false</IsWpfHead>
18-
<IsWpfLib>false</IsWpfLib>
19-
<IsGtk>false</IsGtk>
20-
<IsGtkHead>false</IsGtkHead>
21-
<IsGtkLib>false</IsGtkLib>
8+
<HasWinUI>true</HasWinUI>
9+
<WinUIMajorVersion>2</WinUIMajorVersion>
2210
</PropertyGroup>
2311

2412
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />
25-
<Import Project="$(ToolingDirectory)\MultiTarget\ProjectIdentifiers.props" />
2613
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
2714

2815
<Import Project="$(ToolingDirectory)\ProjectHeads\Tests.Head.Uwp.props" />

0 commit comments

Comments
 (0)