Windows 7 中的 AssemblyDescription 发生了什么变化? [英] What happened to AssemblyDescription in Windows 7?
问题描述
我们使用 AssemblyDescription 属性向我们的程序集添加注释(例如修复/分支信息).
We were using the AssemblyDescription attribute to add notes to our assemblies (e.g. fix/branch info).
文本在 XP 上的属性/评论文件中可见.但在 Windows 7 中,此字段已隐藏.
The text was visible on XP in the file Properties/Comments. However in Windows 7 this field has been hidden.
有没有办法在资源管理器或任何其他工具中显示此字段?
Is there a way to show this field in explorer or any other tool?
MS 是否在任何地方解释了为什么删除了该字段以及我们应该使用什么来代替?(程序集标题?)
Does MS explain anywhere why this field was removed and what we should use instead? (AssemblyTitle?)
推荐答案
在我的测试程序集中,我在我的 AssemblyInfo.cs 中定义了这个
In my test assembly I have this defined in my AssemblyInfo.cs
[assembly: AssemblyDescription("this is a description")]
我可以使用这些行中的任何一行从结果程序集中检索该文本:
I can use either of these lines to retrieve that text from the resultant assembly:
通过 PowerShell
via PowerShell
(dir $path).VersionInfo.Comments
通过 C#
System.Diagnostics.FileVersionInfo.GetVersionInfo(path).Comments
这篇关于Windows 7 中的 AssemblyDescription 发生了什么变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!