<asminfo> Task

# <asminfo>

Generates an AssemblyInfo file using the attributes given.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
language | CodeLanguage | The code language in which the AssemblyInfo file should be generated. | True
output | file | Name of the AssemblyInfo file to generate. | True
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Nested Elements:

#### <attributes>

The assembly-level attributes to generate.

##### <attribute>

Represents an assembly-level attribute.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
type | string | Typename of the assembly-level attribute. | True
asis | bool | If true then the value of the attribute will be set as is, without actually looking for a matching constructor or named properties. The default is false. | False
if | bool | Indicates if the attribute should be generated. | False
unless | bool | Indicates if the attribute should be not generated. | False
value | string | Value of the attribute. | False

##### </attribute>

#### </attributes>

#### <imports>

The namespaces to import.

#### </imports>

#### <references>

Assembly files used to locate the types of the specified attributes.

#### </references>

### Examples

- Create a C# AssemblyInfo file containing the specified assembly-level attributes.

      <asminfo output="AssemblyInfo.cs" language="CSharp">
          <imports>
              <import namespace="System" />
              <import namespace="System.Reflection" />
              <import namespace="System.EnterpriseServices" />
              <import namespace="System.Runtime.InteropServices" />
          </imports>
          <attributes>
              <attribute type="ComVisibleAttribute" value="false" />
              <attribute type="CLSCompliantAttribute" value="true" />
              <attribute type="AssemblyVersionAttribute" value="1.0.0.0" />
              <attribute type="AssemblyTitleAttribute" value="My fun assembly" />
              <attribute type="AssemblyDescriptionAttribute" value="More fun than a barrel of monkeys" />
              <attribute type="AssemblyCopyrightAttribute" value="Copyright (c) 2002, Monkeyboy, Inc." />
              <attribute type="ApplicationNameAttribute" value="FunAssembly" />
          </attributes>
          <references>
              <include name="System.EnterpriseServices.dll" />
          </references>
      </asminfo>

- Create a C# AssemblyInfo file containing an attribute with multiple named properties by setting the `asis` attribute on the AssemblyAttribute element to true.

      <asminfo output="AssemblyInfo.cs" language="CSharp">
          <imports>
              <import namespace="log4net.Config" />
          </imports>
          <attributes>
              <attribute type="DOMConfiguratorAttribute" value="ConfigFile=&quot;config.log4net&quot;,Watch=true" asis="true" />
          </attributes>
          <references>
              <include name="log4net.dll" />
          </references>
      </asminfo>

### Requirements

Assembly: NAnt.DotNetTasks (0.92.4543.0)