Skip to content

Add application icon for Windows builds#5557

Open
ivanduplenskikh wants to merge 1 commit into
masterfrom
users/iduplenskikh/add-application-icon-for-windows
Open

Add application icon for Windows builds#5557
ivanduplenskikh wants to merge 1 commit into
masterfrom
users/iduplenskikh/add-application-icon-for-windows

Conversation

@ivanduplenskikh
Copy link
Copy Markdown
Contributor

Context

The Windows agent executables (Agent.Listener.exe, Agent.Worker.exe, Agent.PluginHost.exe, AgentService.exe) currently ship without an embedded application icon, so Explorer/Task Manager/UAC prompts show the generic default icon. This PR brands the Windows binaries with the Azure Pipelines agent icon.


Description

  • Adds src/Misc/layoutbin/azure-pipelines-agent.ico (the agent application icon).
  • Sets <ApplicationIcon> in the four Windows-facing project files so the icon is embedded as a Win32 resource at publish time:
    • Agent.Listener.csproj, Agent.Worker.csproj, Agent.PluginHost.csproj — gated by Condition="$(PackageRuntime.StartsWith(''win''))" so non-Windows runtime builds are unaffected.
    • Agent.Service/Windows/AgentService.csproj — unconditional (project is only built for win-* runtimes).
  • Updates src/dir.proj layout cleanup so the .ico file is removed from the layout bin/ folder for non-Windows packages (linux, osx, musl), avoiding shipping an unused asset.

Risk Assessment (Low / Medium / High)

Low. Build-only/asset change. No runtime code paths modified. The <ApplicationIcon> element is a standard MSBuild property handled by the .NET SDK; cross-compilation from Linux CI to Windows targets is supported. Non-Windows builds are explicitly excluded by the PackageRuntime condition.


Unit Tests Added or Updated (Yes / No)

No. Asset/build-metadata change with no testable behavior.


Additional Testing Performed

  • Local build of win-x64 agent layout verified the icon is embedded in the produced .exe files and present alongside them in _layout/bin/.
  • Verified the icon is excluded from the layout when building a non-Windows runtime via the new LayoutRootFilesToDelete entry.

Change Behind Feature Flag (Yes / No)

No. Cosmetic build-time change embedded in the binary; cannot meaningfully be flagged.


Tech Design / Approach

  • Uses the standard MSBuild <ApplicationIcon> property — the same mechanism used by every Windows .NET application — so no custom build steps or external tooling are required.
  • Conditioned per PackageRuntime to keep non-Windows publishes byte-identical to before.

Documentation Changes Required (Yes/No)

No.


Logging Added/Updated (Yes/No)

No.


Telemetry Added/Updated (Yes/No)

No.


Rollback Scenario and Process (Yes/No)

Yes. Revert the commit; the next agent package build will produce binaries with no embedded icon, identical to the prior behavior.


Dependency Impact Assessed and Regression Tested (Yes/No)

Yes. No new package or code dependencies introduced. Only MSBuild metadata and a single static asset are added; existing build/publish flows for non-Windows runtimes are unaffected by the PackageRuntime condition.

@ivanduplenskikh ivanduplenskikh requested review from a team as code owners May 8, 2026 11:29
@ivanduplenskikh ivanduplenskikh linked an issue May 8, 2026 that may be closed by this pull request
@ivanduplenskikh ivanduplenskikh added enhancement misc Miscellaneous Changes and removed enhancement labels May 8, 2026
@ivanduplenskikh ivanduplenskikh force-pushed the users/iduplenskikh/add-application-icon-for-windows branch from 737c234 to 9fd4077 Compare May 14, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

misc Miscellaneous Changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[enhancement]: Add Icon to windows executables

1 participant