NAnt SDK Documentation - v0.92 |

# AssemblyFileSet Class

Specialized FileSet class for managing assembly files.

For a list of all members of this type, see AssemblyFileSet Members.

System.Object
NAnt.Core.Element
NAnt.Core.DataTypeBase
NAnt.Core.Types.FileSet
NAnt.DotNet.Types.AssemblyFileSet

[Visual Basic]
<Serializable, _ Serializable, _ ElementName(Name:="assemblyfileset")>
Public Class AssemblyFileSet
Inherits FileSet
Implements ICloneable
[C#]
[Serializable]
[Serializable]
[ElementName(Name="assemblyfileset")]
public class AssemblyFileSet : FileSet, ICloneable

#### Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

#### Remarks

If an include pattern does not contain any wildcard characters then the assembly will be searched for in following locations (in the order listed):

- The base directory of the fileset.
- The directories specified using the nested <lib> element.
- The list of reference assemblies of the current target framework.

The reference assemblies of a given target framework are defined using <reference-assemblies> filesets in the <framework> node of the NAnt configuration file.

#### Example

Define a reference with name "sys.assemblies", holding a set of system assemblies.

    <assemblyfileset id="sys.assemblies">
        <include name="System.dll" />
        <include name="System.Data.dll" />
        <include name="System.Xml.dll" />
    </assemblyfileset>

Use the predefined set of assemblies to compile a C# assembly.

    <csc target="exe" output="HelloWorld.exe">
        <sources>
            <include name="**/*.cs" />
        </sources>
        <references refid="sys.assemblies" />
    </csc>

Compile a C# assembly using assembly references that are searched for in the "Third Party Assemblies" and "Company Assemblies" directories.

    <csc target="exe" output="HelloWorld.exe">
        <sources>
            <include name="**/*.cs" />
        </sources>
        <references>
            <lib>
                <include name="Third Party Assemblies" />
                <include name="Company Assemblies" />
            </lib>
            <include name="log4net.dll" />
            <include name="Company.Business.dll" />
        </references>
    </csc>

#### Requirements

Namespace: NAnt.DotNet.Types

Assembly: NAnt.DotNetTasks (in NAnt.DotNetTasks.dll)

#### See Also

AssemblyFileSet Members | NAnt.DotNet.Types Namespace | FileSet