Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 12242 [details]
Left: Windows built exe, right: Linux built .exe
(I wasn't sure whether this was a Monodevelop/Xamarin issue or an xbuild issue, I assumed xbuild because that actually compiles the icons)
OS: Debian 8.1 Stable
Mono Version: 4.0.2
Monodevelop Version: 5.9.4
Project Type: C#, compiled against the "Mono / .NET 4.5" option
My project when compiled under Linux, turns up with no errors and runs fine on Linux AND Windows. However, when I take the Linux built .exe and bring it to Windows, it has no icon. I have the Win32 Icon path filled in correctly in my Project Settings. In addition, the built exe is ~100kb smaller than a windows built one. When the same project running the same Mono version under the same Xamarin version is built under Windows, an icon is there and it is ~100kb larger than the Linux built .exe. Which leads me to believe that there's either a
-Bug in xbuild on Linux
-xbuild on Linux doesn't support embeddding of Win32 icons and that isn't documented anywhere.
Both applications run just fine on either platform, the issue comes down to when users have the application pinned to their taskbar. The application updates and has no icon, suddenly their pinned version has no icon also. This works the same for desktop shortcuts also.
Just found out that I was actually running msbuild under Windows, didn't know that.
I then ran xbuild and got the same results as my Linux machine. What is the solution to embedding a Win32 icon?
I cannot reproduce your issue. Please attach your csproj file.
Following command line works for me: mcs foo.cs -win32icon:exec_wine.ico
just hastebinned the csproj, if you need the entire solution it's on GitHub
Should I be using mcs as opposed to xbuild though?
Fixed in master