AssemblyInfo.cs文件参数具体讲解

    技术2024-04-20  10

    原文:http://www.cnblogs.com/scy251147/archive/2010/10/23/1859576.html

     

    在asp.net中有一个配置文件AssemblyInfo.cs主要用来设定生成的有关程序集的常规信息dll文件的一些参数,下面是默认的AssemblyInfo.cs文件的内容具体介绍

    //是否符合公共语言规范(CLS)[assembly: CLSCompliant(true) ]//控制程序集中所有类型对COM的可访问性[assembly: ComVisible(false)]//代码的作者和这些代码的的开发人员之间的可靠协定[assembly: ReliabilityContract(Consistency.WillNotCorruptState,Cer.MayFail)]

    //标题:[assembly: AssemblyTitle(".NET Pet Shop Model")]//备注:[assembly: AssemblyDescription(".NET Pet Shop Middle-Tier Components")]//配置文件:[assembly: AssemblyConfiguration("")]//公司:[assembly: AssemblyCompany("Microsoft Corporation")]//产品名称:[assembly: AssemblyProduct(".NET Pet Shop 4.0")]//版权:[assembly: AssemblyCopyright("Copyright ?2005 Microsoft Corporation")]//商标声明:[assembly: AssemblyTrademark("")]//内部名称[assembly: AssemblyCulture("")]

    具体解释如下:

    1. [assembly: AssemblyTitle("")][assembly: AssemblyTitle("")]代码中”:”好前面的assembly表示此属性在程序集范围内发生作用。类型名:System.Reflection.AssemblyTitleAttribute[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyTitleAttribute : Attribute

    此属性描述程序集的名称,如:某某公司某某项目某某模块等,此名称可以是任何合法的字符串,可以有空格。

    2. [assembly: AssemblyDescription("")]类型名:System.Reflection.AssemblyDescriptionAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyDescriptionAttribute : Attribute

    功能:程序集的简单描述,如功能、语言等

    3. [assembly: AssemblyDescription("")]类型名:System.Reflection.AssemblyDescriptionAttribute

    Attribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyDescriptionAttribute : Attribute功能:程序集的简单说明,描述程序集的功能、特性、约束等4. [assembly: AssemblyConfiguration("")]类型名:System.Reflection.AssemblyConfigurationAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyConfigurationAttribute : Attribute功能:程序集的配置信息,如:零售、发布、调试等,.NET运行时没有使用此属性5. [assembly: AssemblyCompany("")]类型名:System.Reflection.AssemblyCompanyAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyCompanyAttribute : Attribute功能:程序集所属的公司名称6. [assembly: AssemblyProduct("")]类型名:System.Reflection.AssemblyProductAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyProductAttribute : Attribute功能:程序集所述的产品名

    7. [assembly: AssemblyCopyright("")]类型名:System.Reflection.AssemblyCopyrightAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyCopyrightAttribute : Attribute功能:程序集的版权信息

    8. [assembly: AssemblyTrademark("")]类型名:System.Reflection.AssemblyTrademarkAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyTrademarkAttribute : Attribute功能:程序集的商标信息

    9. [assembly: AssemblyCulture("")]类型名:System.Reflection.AssemblyCultureAttributeAttribute声明:[AttributeUsage(AttributeTargets.Assembly)]public sealed class AssemblyCultureAttribute : Attribute功能:枚举的字段表明程序集支持的区域性。程序集也可以指定区域独立性,表明它包含用于默认区域性的资源。运行库将任何区域性属性未设为空的程序集按附属程序集处理。此类程序集受附属程序集绑定规则约束。详细信息,请参见运行库如何定位程序集。

     

    最新回复(0)