|
23 | 23 | </PropertyGroup> |
24 | 24 |
|
25 | 25 | <!-- |
26 | | - Standalone (unpackaged) build configuration - DEFAULT. |
27 | | - Used for GitHub Releases distribution with Inno Setup installer. |
28 | | - Build with: dotnet build (no extra parameters needed) |
| 26 | + Standalone (unpackaged) build: dotnet build (default) |
| 27 | + Store (MSIX) build: dotnet build -p:PackageMode=Store |
29 | 28 | --> |
30 | 29 | <PropertyGroup Condition="'$(PackageMode)' != 'Store'"> |
31 | 30 | <ApplicationManifest>app.manifest</ApplicationManifest> |
|
35 | 34 | <AppxPackage>false</AppxPackage> |
36 | 35 | <EnableMsixTooling>false</EnableMsixTooling> |
37 | 36 |
|
38 | | - <!-- |
39 | | - Publishing optimizations for standalone (self-contained) builds: |
40 | | - - ReadyToRun: Precompiles IL to native code (faster cold start) |
41 | | - - ReadyToRunComposite: Better R2R optimization for self-contained apps |
42 | | - - Trimming partial: Removes unused code but preserves reflection (required for XAML) |
43 | | - Note: These require self-contained and are NOT compatible with MSIX/Store builds. |
44 | | - --> |
45 | 37 | <PublishReadyToRun>true</PublishReadyToRun> |
46 | 38 | <PublishReadyToRunComposite>true</PublishReadyToRunComposite> |
47 | 39 | <PublishTrimmed>true</PublishTrimmed> |
|
51 | 43 | <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings> |
52 | 44 | </PropertyGroup> |
53 | 45 |
|
54 | | -<!-- |
55 | | - Microsoft Store (MSIX) build configuration. |
56 | | - Used for Store distribution. Activated with: dotnet build -p:PackageMode=Store |
57 | | - Identity values (Name, Publisher) are set via CI/CD secrets in release pipeline. |
58 | | ---> |
59 | 46 | <PropertyGroup Condition="'$(PackageMode)' == 'Store'"> |
60 | 47 | <WindowsPackageType>MSIX</WindowsPackageType> |
61 | 48 | <WindowsAppSDKSelfContained>false</WindowsAppSDKSelfContained> |
|
64 | 51 | <GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild> |
65 | 52 | </PropertyGroup> |
66 | 53 |
|
67 | | -<!-- |
68 | | - Trimming configuration for third-party assemblies that don't support trimming. |
69 | | - Only applies to standalone builds where PublishTrimmed=true. |
70 | | ---> |
71 | 54 | <ItemGroup Condition="'$(PackageMode)' != 'Store'"> |
72 | 55 | <TrimmerRootAssembly Include="Microsoft.Windows.SDK.NET" /> |
73 | 56 | <TrimmerRootAssembly Include="WinRT.Runtime" /> |
|
79 | 62 | <Manifest Include="$(ApplicationManifest)" Condition="'$(PackageMode)' != 'Store'" /> |
80 | 63 | </ItemGroup> |
81 | 64 |
|
82 | | - <!-- MSIX manifest included only for Store builds --> |
| 65 | + <!-- MSIX manifest only for Store builds --> |
83 | 66 | <ItemGroup Condition="'$(PackageMode)' == 'Store'"> |
84 | 67 | <AppxManifest Include="Package.appxmanifest" /> |
85 | 68 | </ItemGroup> |
|
109 | 92 | </ItemGroup> |
110 | 93 |
|
111 | 94 |
|
112 | | - <!-- Copy PRI file to publish output (CRITICAL for XAML loading in Release) --> |
113 | 95 | <Target Name="CopyPriToPublish" AfterTargets="Publish"> |
114 | 96 | <Copy SourceFiles="$(OutputPath)$(AssemblyName).pri" DestinationFolder="$(PublishDir)" SkipUnchangedFiles="true" /> |
115 | 97 | </Target> |
116 | 98 |
|
117 | | - <!-- Copy Assets folder to publish output --> |
118 | 99 | <Target Name="CopyAssetsToPublish" AfterTargets="Publish"> |
119 | 100 | <ItemGroup> |
120 | 101 | <AssetFiles Include="$(OutputPath)Assets\**\*" /> |
|
0 commit comments