可通过C#程序集设置的File Explorer「详细信息」项有哪些?
More Assembly Attributes for File Explorer Details
Nice catch on all those assembly attributes you’ve already mapped to File Explorer’s detail pane! You’re missing a few more that can fill in additional fields, plus a bonus trick for even more customization:
- 「描述」: Pulled from the
AssemblyDescriptionattribute. This is perfect for adding longer, explanatory text about your assembly—you’ll see this show up in the "Description" field in File Explorer. - 「配置」: Comes from the
AssemblyConfigurationattribute. Set this to"Debug"or"Release"(or any custom value you use for build configurations) and it’ll populate the "Configuration" detail item. - 「语言」: While not a strict 1:1 mapping, the
NeutralResourcesLanguageAttributeimpacts the "Language" field. For example, if you add[assembly: NeutralResourcesLanguage("zh-CN")], File Explorer will often display the corresponding locale here. - 「私人构建」: This can be filled indirectly. If you use a wildcard (
*) in the fourth segment ofAssemblyVersion(which auto-generates a build number), that value might show up here. Alternatively, adding build metadata toAssemblyInformationalVersion(like1.0.0+build20240520) can also populate this field on some Windows versions.
Bonus: Custom Fields via Native Resources
If you need to set fields that don’t have a direct .NET assembly attribute (like "Operating System" or "Original Filename"), you can embed a native Windows resource file (.rc) into your C# project. This lets you define these extra properties manually, though it’s a separate setup from standard assembly attributes.
内容的提问来源于stack exchange,提问作者John Denniston
相关产品推荐
相关产品推荐

