# AssemblyBuilder

> Compiles scripts outside the Assets folder into a managed assembly that can be used inside the Assets folder.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Compilation](/engine/6000.6/script-reference/unityeditor/compilation.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Deprecated.** This feature is being deprecated and will be removed in the future. Similar functionality can be achieved using the Roslyn compiler

```csharp
public class AssemblyBuilder
```

## Remarks

The AssemblyBuilder class compiles scripts that are outside the Assets folder into a managed assembly, with the same references and #define directives as scripts inside the Assets folder. This is useful for building assemblies of scripts you do not want placed in the Assets folder.

See [AssemblyBuilder.Build](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/build.md) for an example of how to use this class.

## Constructors

| Constructor                                                                                                                         | Description                  |
| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| [AssemblyBuilder(System.String,System.String\[\])](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/ctor.md) | AssemblyBuilder constructor. |

## Properties

| Property                                                                                                                | Description                                                                                                 |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [additionalDefines](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/additionaldefines.md)       | Additional #define directives passed to compilation of the assembly.                                        |
| [additionalReferences](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/additionalreferences.md) | Additional assembly references passed to compilation of the assembly.                                       |
| [assemblyPath](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/assemblypath.md)                 | Output path of the assembly to build. (Read Only)                                                           |
| [buildTarget](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/buildtarget.md)                   | [BuildTarget](/engine/6000.6/script-reference/unityeditor/buildtarget.md) for the assembly build.           |
| [buildTargetGroup](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/buildtargetgroup.md)         | [BuildTargetGroup](/engine/6000.6/script-reference/unityeditor/buildtargetgroup.md) for the assembly build. |
| [compilerOptions](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/compileroptions.md)           | Compiler options to use when building the assembly.                                                         |
| [defaultDefines](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/defaultdefines.md)             | Default defines used when compiling the assembly.                                                           |
| [defaultReferences](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/defaultreferences.md)       | Default references used when compiling the assembly.                                                        |
| [excludeReferences](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/excludereferences.md)       | References to exclude when compiling the assembly.                                                          |
| [flags](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/flags.md)                               | Flags to control the assembly build.                                                                        |
| [referencesOptions](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/referencesoptions.md)       | Options to control the references that Unity uses during an assembly build.                                 |
| [scriptPaths](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/scriptpaths.md)                   | Array of script paths used as input for assembly build. (Read Only)                                         |
| [status](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/status.md)                             | Current status of assembly build. (Read Only)                                                               |
| [subtarget](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/subtarget.md)                       | Subtarget for the assembly build.                                                                           |

## Methods

| Method                                                                                    | Description                       |
| ----------------------------------------------------------------------------------------- | --------------------------------- |
| [Build](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/build.md) | Starts the build of the assembly. |

## Events

| Member                                                                                                    | Description                                                                |
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [buildFinished](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/buildfinished.md) | Event that is invoked on the main thread when the assembly build finishes. |
| [buildStarted](/engine/6000.6/script-reference/unityeditor/compilation/assemblybuilder/buildstarted.md)   | Event that is invoked on the main thread when the assembly build starts.   |
