Embed multiple icons in WPF EXE

前端 未结 5 837
后悔当初
后悔当初 2020-12-30 12:38

I have a WPF assembly in which I would like to embed five icons for different filetypes associated with my application. How can I embed these icons into my EXE?

@sm

5条回答
  •  旧巷少年郎
    2020-12-30 13:18

    1. Create App.rc:

      101 ICON "Application.ico"
      102 ICON "Document.ico"
      103 ICON "Help.ico"
      
    2. Compile:

      rc App.rc
      
    3. Add App.res to your project (leave None as your Build Action).
    4. Build.

    All done!

提交回复
热议问题