5e6a29e8b1
Directory.Build.targets sets ApplicationIcon for each Exe/WinExe project under src/ (not tests, not non-Windows RIDs, not a project with its own), so a new Windows executable gets the icon with no project change. The path lives once, as ExecuteRIconPath in Directory.Build.props, which both MSIs now use for ARPPRODUCTICON too; the three per-project copies are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
1.3 KiB
XML
25 lines
1.3 KiB
XML
<Project>
|
|
|
|
<!--
|
|
Branding (README, Branding): every executable under src/ (OutputType Exe
|
|
or WinExe) embeds the product icon, assets/icons/app.ico, so a new Windows
|
|
exe project picks it up with no project change. Here, not in
|
|
Directory.Build.props, because OutputType is only known once the project
|
|
body has been read. The SDK copies the managed assembly's Win32 resources
|
|
(icon and version info) into the apphost, single-file and self-contained
|
|
publishes included. Tests (and their helper exes under tests/) are left
|
|
out; a project that sets its own ApplicationIcon keeps it; non-Windows RIDs
|
|
have no use for one. Conditional on the file because the backend image's
|
|
build context has no assets directory.
|
|
-->
|
|
<PropertyGroup Condition="'$(ApplicationIcon)' == ''
|
|
And ('$(OutputType)' == 'Exe' Or '$(OutputType)' == 'WinExe')
|
|
And '$(IsTestProject)' != 'true'
|
|
And $([MSBuild]::MakeRelative('$(MSBuildThisFileDirectory)', '$(MSBuildProjectDirectory)').Replace('\', '/').StartsWith('src/'))
|
|
And ('$(RuntimeIdentifier)' == '' Or $(RuntimeIdentifier.StartsWith('win')))
|
|
And Exists('$(ExecuteRIconPath)')">
|
|
<ApplicationIcon>$(ExecuteRIconPath)</ApplicationIcon>
|
|
</PropertyGroup>
|
|
|
|
</Project>
|