Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set application icon on Windows? #6260

Closed
vadi2 opened this issue May 13, 2021 · 4 comments
Closed

How to set application icon on Windows? #6260

vadi2 opened this issue May 13, 2021 · 4 comments

Comments

@vadi2
Copy link

vadi2 commented May 13, 2021

Using .NET 5 and <OutputType>WinExe</OutputType>, how can one set the application icon of the generated .exe?

@vitek-karas
Copy link
Member

Add <ApplicationIcon>App.ico</ApplicationIcon> to your project file.

@mairaw
Copy link
Contributor

mairaw commented May 14, 2021

I believe this has been answered, so closing.

@mairaw mairaw closed this as completed May 14, 2021
@vadi2
Copy link
Author

vadi2 commented May 15, 2021

While this helped with the explorer view, the icon used by the window manager and the task bar is not correct -

image

Is there a trick to this?

@vitek-karas
Copy link
Member

This icon comes from the window itself. It depends which UI stack you're using to create the window. For example for WinForms it can be done like this: https://stackoverflow.com/a/18736559/327203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants