Generates an AssemblyInfo file using the attributes given.
Parameters
Nested elements
<attributes>
The assembly-level attributes to generate.
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 |
<attributes>
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 NAnt.DotNet.Types.AssemblyAttribute.AsIs
attribute on the NAnt.DotNet.Types.AssemblyAttribute
element to
true
.
<asminfo output="AssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="log4net.Config" />
</imports>
<attributes>
<attribute type="DOMConfiguratorAttribute" value="ConfigFile="config.log4net",Watch=true" asis="true" />
</attributes>
<references>
<include name="log4net.dll" />
</references>
</asminfo>
Requirements
- Assembly
- NAnt
.DotNet .dll - Namespace
-
NAnt
.DotNet .Tasks