Reputation:
I want to change an .exe file icon before compiling with csc .
as example : I hava a *.cs file and want to compile it to an .exe file . I am compiling with csc without using Visual Studio .
I can do it using this way in VS : (To specify an application icon In Solution Explorer, choose a project node (not the Solution node). On the menu bar, choose Project, Properties. When the Project Designer appears, choose the Application tab. In the Icon list, choose an icon (.ico) file. ) but I want to do a similar way (programatically) , using csc .
Is it possible to change file icon with csc (c sharp compiler )?
tnx
Upvotes: 2
Views: 3255
Reputation: 14477
The /win32icon
option inserts an .ico file in the output file, which gives the output file the desired appearance in the File Explorer.
/win32icon:filename
If you have some time, take a look to the list of C# Compiler Options.
Upvotes: 7