.NET Framework 中的“AssemblyTitle"属性 [英] 'AssemblyTitle' attribute in the .NET Framework

查看:36
本文介绍了.NET Framework 中的“AssemblyTitle"属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AssemblyTitle 属性的实际用途是什么?MSDN 说它指定了程序集的描述,程序集标题是一个可以包含空格的友好名称.

What is the practical use of the AssemblyTitle attribute? MSDN says that it specifies a description for an assembly and that the assembly title is a friendly name which can include spaces.

Visual Studio 在项目的属性窗口中要求程序集名称以及默认命名空间.有一个 AssemblyName 属性,但它完整地描述了程序集的唯一标识(即文化等).我看不出 AssemblyTitleAssemblyProduct 有何不同.

Visual Studio asks for the assembly name in the properties window of the project along with the default namespace. There is an AssemblyName attribute but it describes an assembly's unique identity in full (i.e., culture, etc.). I don't see how AssemblyTitle differs from AssemblyProduct.

我使用 IL Disassembler 来了解 Microsoft 如何使用 AssemblyTitle.我发现在 mscorlib.dll 中,AssemblyTitleAssemblyProductAssemblyDefaultAlias 都设置为 "mscorlib.dll".

I used the IL Disassembler to see how Microsoft uses AssemblyTitle. I discovered that in mscorlib.dll, AssemblyTitle, AssemblyProduct and AssemblyDefaultAlias are all set to "mscorlib.dll".

总而言之,我真正希望看到的是使用 AssemblyTitle 的实际示例.

In conclusion, what I really would like to see are practical examples of the use of AssemblyTitle.

推荐答案

您的产品可以由多个程序集组成.

Your Product can comprise of several assemblies.

所有程序集将有一个单一的产品名称,个别程序集将有自己的标题.

All of the assemblies will have a single product name and individual assemblies will have their own titles.

AssemblyProduct = "MyProduct"

AssemblyTitle = "MyProduct.Utilities"

和另一个程序集

AssemblyTitle = "MyProduct.Security"

程序集标题也用于资源管理器文件属性等. File >属性 >详情标签

the assembly title is also used in the explorer file properties etc. File > Properties > Details tab

File Description = AssemblyTitle
Product name = AssemblyProduct

这篇关于.NET Framework 中的“AssemblyTitle"属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆