Usage - IconChanger

Commandline arguments

Usage example:

BrokenEvent.IconChanger.exe InputFile.exe [-main MainIcon.ico] [-add FileIcon1.ico] [-add FileIcon2.ico] ...

Arguments description:

InputFile.exe    Absolute path to the exectuable to change. Required.
-main            Absolute path to an .ico file to set as main icon. Optional. Main icon will not be changed if omitted.
-add             Absolute path to an .ico file to add to executable. Optional. Multiple values.

MSBuild Task of NuGet Package

The package will install MSBuild target when installed by the NuGet. By default this target will do nothing. To make it work you should use MSBuild properties.

PropertyGroups

  • IconMain - absolute path to the .ico file to set as executable's main icon.

ItemGroups

  • Icons - list of absolute paths of additional icons to be added to the exectuable. Icons will be added in the order in which they are added to the item group.

Properties

The most simple way to add custom properties to MSBuild of Visual Studio project is to create a file named Directory.Build.props at root of project.

Example of such file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <IconMain>$(SolutionDir)Artwork\Icons\main.ico</IconMain>
  </PropertyGroup>
  
  <ItemGroup>
    <Icons Include="$(SolutionDir)Artwork\Icons\project.ico"/>
    <Icons Include="$(SolutionDir)Artwork\Icons\changeset.ico"/>
    <Icons Include="$(SolutionDir)Artwork\Icons\snapshot.ico"/>
  </ItemGroup>
</Project>