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 任务管理器中,它错误地显示了可执行文件名称,并带有一个子项:
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?
-布兰登
推荐答案
通过反复试验,我发现 Windows 8 任务管理器显示 exe 名称而不管 [AssemblyTitle],如果您的文件没有数字签名.我认为这是一种安全措施.解决方案:数字签名.
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屋!