C#如何正确设置Windows 8任务管理器的程序集标题? [英] C# How to correctly set assembly title for Windows 8 Task Manager?
问题描述
我已设置标题&我的C#Winforms可执行文件的程序集信息如下:
I've set the title & assembly info of my C# Winforms executable as follow:
[assembly: AssemblyTitle("Widgets Galore")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Widgets Inc")]
[assembly: AssemblyProduct("Widgets Galore")]
[assembly: AssemblyCopyright("Copyright © Widgets Inc 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
...
MainForm.Text = "Widgets Galore by Widgets Incorporated";
...
// Compiles to: widgets.app.exe
在Windows 7任务管理器中,它正确地将该过程显示为主窗体标题:
In Windows 7 Task Manager, it correctly shows the process as the main form title:
"Widgets Galore by Widgets Incorporated"
但是在Windows 8 Task Manager中,它错误地显示了可执行文件名称,子项:
However in Windows 8 Task Manager, it incorrectly shows the executable name, with a sub item:
"widgets.app"
|--"Widgets Galore by Widgets Incorporated".
我在Windows 8任务管理器中看到很多其他应用程序以友好名称列出,并且希望才能看到我的应用程序执行相同的操作。
I see plenty of other applications listed with a friendly name in the Windows 8 Task Manager, and would like to see my app do the same.
如何强制W8为我的应用程序命名一个友好的名称?
How can I force W8 to do a friendly name for my app?
-Brendan
推荐答案
通过反复试验,我发现Windows 8 Task Manager不管[AssemblyTitle]都显示exe名称,如果您的文件未经过数字签名。我认为这是一种安全措施。解决方案:进行数字签名。
Through trial and error I found that Windows 8 Task Manager shows the exe name regardless of [AssemblyTitle], IF your file is not digitally signed. I assume this is a security measure. Solution: digitally sign.
这篇关于C#如何正确设置Windows 8任务管理器的程序集标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!