The configuration file assemblyinfo. CS is mainly used to set some parameters of the generated assembly-related general information DLL file. The following describes the content of the default assemblyinfo. CS file.
// Whether the public language specification (CLS) is met)
[Assembly: clscompliant (true)]
// Control the accessibility of all types of COM in the dataset
[Assembly: comvisible (false)]
// Reliable agreement between the author of the Code and the developers of the Code
[Assembly: reliabilitycontract (consistency. willnotcorruptstate, Cer. mayfail)]
// Title:
[Assembly: assemblytitle (". Net pet shop model")]
// Remarks:
[Assembly: assemblydescription (". Net Pet Shop middle-tier components")]
// Configuration file:
[Assembly: assemblyconfiguration ("")]
// Company:
[Assembly: assemblycompany ("Microsoft Corporation")]
// Product Name:
[Assembly: assemblyproduct (". Net Pet Shop 4.0")]
// Copyright:
[Assembly: assemblycopyright ("Copyright? 2005 Microsoft Corporation ")]
// Trademark declaration:
[Assembly: assemblytrademark ("")]
// Internal name
[Assembly: assemblyculture ("")]
The specific explanation is as follows:
1. [Assembly: assemblytitle ("")]
[Assembly: assemblytitle ("")] in the code ":" The preceding Assembly indicates that this attribute works within the Assembly range.
Type name: system. reflection. assemblytitleattribute
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblytitleattribute: attribute
This attribute describes the Assembly name, for example, the module of a project of a certain company. This name can be a legal string with spaces.
2. [Assembly: assemblydescription ("")]
Type name:
System. reflection. assemblydescriptionattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblydescriptionattribute: attribute
Function:
Simple Description of an Assembly, such as functions and languages
3. [Assembly: assemblydescription ("")]
Type name:
System. reflection. assemblydescriptionattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblydescriptionattribute: attribute
Function:
Describes the functions, features, and constraints of an assembly.
4. [Assembly: assemblyconfiguration ("")]
Type name:
System. reflection. assemblyconfigurationattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblyconfigurationattribute: attribute
Function:
Assembly configuration information, such as retail, release, debugging, etc. This attribute is not used during. Net runtime.
5. [Assembly: assemblycompany ("")]
Type name:
System. reflection. assemblycompanyattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblycompanyattribute: attribute
Function:
Company Name of the Assembly
6. [Assembly: assemblyproduct ("")]
Type name:
System. reflection. assemblyproductattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblyproductattribute: attribute
Function:
Product Name described in assembly
7. [Assembly: assemblycopyright ("")]
Type name:
System. reflection. assemblycopyrightattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblycopyrightattribute: attribute
Function:
Assembly copyright information
8. [Assembly: assemblytrademark ("")]
Type name:
System. reflection. assemblytrademarkattriction
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblytrademarkattribute: attribute
Function:
Trademark Information of the Assembly
9. [Assembly: assemblyculture ("")]
Type name:
System. reflection. assemblycultureattribute
Attribute declaration:
[Attributeusage (attributetargets. Assembly)]
Public sealed class assemblycultureattribute: attribute
Function:
The enumerated field indicates the region supported by the Assembly. An assembly can also specify regional independence, indicating that it contains resources for the default culture. The runtime processes the assemblies that are not set to NULL for any regional properties by the affiliated assemblies. This type of assembly is subject to the binding rules of the affiliated Assembly. For more information, see how the runtime locates the assembly.
Here is a simple example:
Using system. reflection; using system. runtime. compilerservices; using system. runtime. interopservices; // The general information about the assembly is controlled through the following property set. Changing these property values can modify // information associated with the Assembly. [Assembly: assemblytitle ("mobilemanager. dal ")] [Assembly: assemblydescription (" ")] [Assembly: assemblyconfiguration (" ")] [Assembly: assemblycompany (" ACCP ")] [Assembly: assemblyproduct (" mobilemanager. dal ")] [Assembly: assemblycopyright (" Copyright ACCP 2010 ")] [Assembly: assemblytrademark (" ")] [Assembly: assemblyculture (" ")] // set comvisible to false to make the type in this Assembly invisible to the COM component. If you need to access the type in this Assembly from com, // set the comvisible attribute on this type to true. [Assembly: comvisible (false)] // if this item is made public to com, the following GUID is used for the ID of the Type Library [Assembly: GUID ("d5e142a8-2668-4536-82f4-93f47c56f001")] // The Assembly version information consists of the following four values: // main version/secondary version/internal version/revision number // you can specify all these values, you can also use the default values of "internal version number" and "revision number". // The method is to use "*": // [Assembly: assemblyversion ("1. 0. * ")] [Assembly: assemblyversion (" 1.0.0.0 ")] [Assembly: assemblyfileversion (" 1.0.0.0 ")]
Blog Source:
Http://www.cnblogs.com/scy251147/archive/2010/10/23/1859576.html