# Sandbox.Compiler

Given a folder of .cs files, this will produce (and load) an assembly

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Compiling`
- Modifiers: sealed

## Properties

- [`AssemblyName`](/api/Sandbox.Compiler/AssemblyName): Generated assembly name, without an extension. This will be "package.{Name}".
- [`BuildResult`](/api/Sandbox.Compiler/BuildResult): Results for the assembly build. This can contain warnings or errors.
- [`BuildSuccess`](/api/Sandbox.Compiler/BuildSuccess): Accesses Output.Successful
- [`Diagnostics`](/api/Sandbox.Compiler/Diagnostics): A list of warnings and errors created by the last build
- [`FileSystem`](/api/Sandbox.Compiler/FileSystem): An aggregate of all the filesystem this compiler has
- [`GeneratedCode`](/api/Sandbox.Compiler/GeneratedCode): Global namespaces
- [`Group`](/api/Sandbox.Compiler/Group): Each compiler must belong to a compile group
- [`IsBuilding`](/api/Sandbox.Compiler/IsBuilding): Is this compiler currently building?
- [`Name`](/api/Sandbox.Compiler/Name): Name of the project this compiler was created for. This could be something like "base" or "org.ident".
- [`NeedsBuild`](/api/Sandbox.Compiler/NeedsBuild): Returns true if this compiler is pending a build, or currently building.
- [`Output`](/api/Sandbox.Compiler/Output): The output from the previous build
- [`UseAbsoluteSourcePaths`](/api/Sandbox.Compiler/UseAbsoluteSourcePaths): During development we use absolute source paths so that debugging works better. In a packed/release build it's good to use relative paths instead, just to avoid exposing the builder's file system.

## Methods

- [`AddEditorReference`](/api/Sandbox.Compiler/AddEditorReference): Add a reference to the given package's editor assembly.
- [`AddReference`](/api/Sandbox.Compiler/AddReference): Add a reference to this compiler. This might be a system dll, or an assembly name from a fellow compiler.
- [`AddSourcePath`](/api/Sandbox.Compiler/AddSourcePath): Add an extra source path. Useful for situations where you want to combine multiple addons into one.
- [`AddToolBaseReference`](/api/Sandbox.Compiler/AddToolBaseReference): Add a reference to the "`toolbase`" package.
- [`DependencyIndex`](/api/Sandbox.Compiler/DependencyIndex)
- [`Dispose`](/api/Sandbox.Compiler/Dispose)
- [`GetConfiguration`](/api/Sandbox.Compiler/GetConfiguration)
- [`HasReference`](/api/Sandbox.Compiler/HasReference): Returns true if `P:Sandbox.Compiler._references` contains the given reference assembly name. If `deep` is true, referenced compilers are searched too.
- [`MarkForRecompile`](/api/Sandbox.Compiler/MarkForRecompile): Recompile this as soon as is appropriate
- [`NotifyFastHotload`](/api/Sandbox.Compiler/NotifyFastHotload)
- [`SetConfiguration`](/api/Sandbox.Compiler/SetConfiguration)
- [`StripDisabledTextTrivia`](/api/Sandbox.Compiler/StripDisabledTextTrivia): Strips out disabled text trivia from the syntax tree. This is stuff like `#if false` blocks that are not compiled.
- [`UpdateFromArchive`](/api/Sandbox.Compiler/UpdateFromArchive): Fill this compiler from a code archive
- [`WatchForChanges`](/api/Sandbox.Compiler/WatchForChanges): Watch the filesystem for changes to our c# files, and trigger a recompile if they change.
