What happened to AssemblyDescription in Windows 7?

2020-05-20 08:02发布

问题:

We were using the AssemblyDescription attribute to add notes to our assemblies (e.g. fix/branch info).

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?

Does MS explain anywhere why this field was removed and what we should use instead? (AssemblyTitle?)

回答1:

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:

via PowerShell

(dir $path).VersionInfo.Comments

via C#

System.Diagnostics.FileVersionInfo.GetVersionInfo(path).Comments


回答2:

If you want to display AssemblyDescription in Windows 7 Explorer, you will need a custom shell extension, like the following:

  • VersionTab