1

I'm trying to embed multiple .ico files (with multiple sizes) for an Application executable in Visual Studio 2019.

Until now I have added a single .ico file to the project root and set it as the application icon to use via Project -> Properties -> Application referenced it under Resources, Icon and manifest.

I read somewhere that it would be possible to embed multiple icons by adding them to a resource file so I created a new resource file from Project -> Properties -> Resources and added two existing .ico files. I then selected this resource file (.resx) instead of a single icon under Project -> Properties -> Application.

However, when trying to bild the application I get the following error:

Error   CS1583  Error reading Win32 resources -- Image is too small.

Even if I only add a single icon (the same that was used to begin with) to the resource file I get the same error. It is curious since that icon worked when setting it directly in the Project -> Properties -> Application dialog.

enter image description here

enter image description here

Is this the wrong approach for embedding multiple icons or might there be something else going on?

norsemanGrey
  • 345
  • 4
  • 10
  • [Adding multiple Icons (Win32-Resource) to .NET-Application](https://stackoverflow.com/q/8913018/14171304). Also you can use [this](https://einaregilsson.com/add-multiple-icons-to-a-dotnet-application/) tool to do so. – dr.null Nov 18 '20 at 22:49
  • How did you set the icon? `this.Icon = Properties.Resources.Icon1;` works fine in my project. – 大陸北方網友 Nov 19 '20 at 02:09

0 Answers0