Reputation: 17
I can already export a Visual Studio c# program to a single file exe. What I was curious about is if anyone knows of the console tag for adding a image to the exe or if I would have to do that in the properties beforehand. I tried in properties and it didn't work.
Upvotes: 1
Views: 1038
Reputation: 90
From visual studio in the solution explorer right click on the project and select Properties. From Application tab in Resources grouping select an icon that icon will be applied to the executable file.
In addition if you would create a setup project and add shortcut to the desktop then you have to separately select an icon for the shortcut.
Upvotes: 1
Reputation: 306
<Window x:Class="WindowSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WPF Window Sample" Height="350" Width="525"
Name="FirstWindow" Icon="Icon1.ico" >
I believe all you have to do is add Icon=""
to your <Window>
In this example the custom icon file is in the project folder, and its named "Icon1.ico".
.ico
file.If you want even more help you should consider checking out this article.
Upvotes: 0