Skip to content

Commit 6db8ab3

Browse files
Restore self-contained Windows App SDK packaging
The shared-target-framework refactor moved the Windows App SDK self-contained settings into Directory.Build.props behind a condition that depends on TargetFramework being set. Because Directory.Build.props is evaluated before UniGetUI.csproj assigns TargetFramework, the app project stopped evaluating as self-contained and no longer bundled Microsoft.WindowsAppRuntime.dll in release artifacts. Move the self-contained Windows App SDK settings into UniGetUI.csproj so they are evaluated after the app TargetFramework is known and the runtime payload is bundled again. Fixes #4487.
1 parent c488ba7 commit 6db8ab3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Directory.Build.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
<PropertyGroup Condition="$([System.String]::Copy('$(TargetFramework)').Contains('-windows'))">
3737
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
3838
<WindowsSdkPackageVersion>10.0.26100.56</WindowsSdkPackageVersion>
39-
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
40-
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
41-
<RuntimeIdentifier
42-
Condition="'$(Platform)' != '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU'"
43-
>win-$(Platform)</RuntimeIdentifier
44-
>
4539
</PropertyGroup>
4640

4741
<PropertyGroup>

src/UniGetUI/UniGetUI.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
<!-- .NET & AppSdk publish options -->
1515
<WindowsAppSDKWinUI>true</WindowsAppSDKWinUI>
1616
<WindowsPackageType>None</WindowsPackageType>
17+
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
18+
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
19+
<RuntimeIdentifier
20+
Condition="'$(Platform)' != '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU'"
21+
>win-$(Platform)</RuntimeIdentifier
22+
>
1723

1824
<!--PublishAot>true</PublishAot-->
1925
<PublishTrimmed>true</PublishTrimmed>

0 commit comments

Comments
 (0)