Automatically embed multiple icons in a .NET Executable

后端 未结 4 884
Happy的楠姐
Happy的楠姐 2021-01-19 01:50

I basically have the same issue as this question: Embed multiple icons in WPF EXE

My .NET 2.0 WinForms application currently has this when you click \"Change Icon\"

4条回答
  •  死守一世寂寞
    2021-01-19 02:34

    I've just created a simple tool to do exactly this without having to mess with .res files. It is a tiny utility which you can use as part of your Post-Build event and lets you add all icon files in a particular folder to your assembly. If we assume that you have a icons folder under your main project folder you can add the following post-build event:

    C:\path\to\InsertIcons.exe $(TargetPath) $(ProjectDir)icons
    

    A further description and a download can be found at http://einaregilsson.com/add-multiple-icons-to-a-dotnet-application/

提交回复
热议问题