Application size increases when you configure the application icon from resources

I have a 16kb app.

After adding the icon resource to the "Project Properties" menu, the application, as expected, increased to 299 KB.

Now, in the "Properties / Application" section, when I installed the icon file in "Resource \ IconName.ico", the file size again increases to 581 kilobytes.

Is this normal behavior? I understand that it increases when I add the icon as a resource, but not when I install the icon from the resources in the application icon.

Can someone explain why this is happening?

EDIT:

Perhaps the best question is how to set the application icon using the icon from the Properties / Resources section?

+5
1

, . ( ), exe , . (, explorer.exe ), 2 :

  • , exe Windows
  • .NET

, , , , , , :

var executablePath = Assembly.GetExecutingAssembly().Location;
var icon = Icon.ExtractAssociatedIcon(executablePath);
+5

All Articles