我按照https://stackoverflow.com/a/12491626/67824中的说明设置了图标,但它仍然显示为停靠栏和⌘+标签应用程序切换器中的通用应用程序图标(带有绿色" exec"文本的灰色屏幕) (当我从MonoDevelop运行它时以及当我使用mono foo.exe
运行它时)。我知道它可以完成,因为当我运行mono-compliant version of LINQPad时,我看到了LINQPad应用程序图标。
答案 0 :(得分:0)
我还在主窗口的类中使用SetIconFromFile方法。我的图标被复制到应用程序根目录下的Images文件夹的示例如下:
this.SetIconFromFile(string.Format("{0}{1}Images{2}Logo.ico",
System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
System.IO.Path.DirectorySeparatorChar,
System.IO.Path.DirectorySeparatorChar));