# Project

Class in [Yarn.Compiler](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler)

Inherits from `System.Object`

## Summary

Yarn Projects represent instructions on where to find Yarn scripts and associated assets, and how they should be compiled.

```csharp
public class Project
```

## Classes

| Name                                                                                                                                       | Description                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| [LocalizationInfo](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.localizationinfo) | Stores the locations of where localized assets and a localized string table for a Yarn Project may be found. |

## Constructors

| Name                                                                                                                                     | Description                                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [Project()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project..ctor-1)               | Initializes a new instance of the [Project](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project) class. |
| [Project(string,string?)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project..ctor-2) | Initializes a new instance of the [Project](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project) class. |

## Fields

| Name                                                                                                                                                           | Description                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [CurrentProjectFileVersion](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.currentprojectfileversion)   | The current version of `.yarnproject` file format.                                |
| [WorkspaceRootPlaceholder](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.workspacerootplaceholder)     | A placeholder string that represents the location of the workspace root in paths. |
| [YarnSpinnerProjectVersion2](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.yarnspinnerprojectversion2) | A version number representing Yarn Spinner 2.                                     |
| [YarnSpinnerProjectVersion3](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.yarnspinnerprojectversion3) | A version number representing Yarn Spinner 3.                                     |

## Methods

| Name                                                                                                                                                    | Description                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetJson()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.getjson)                              | Gets a string containing JSON-formatted text that represents this [Project](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project) . |
| [IsMatchingPath(string)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.ismatchingpath)          | Gets a value indicating whether `path` is a path that is included in this project.                                                                             |
| [IsValidVersionNumber(int)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.isvalidversionnumber) | Gets a value indicating whether `number` is a valid Yarn Spinner version number.                                                                               |
| [LoadFromFile(string,string?)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.loadfromfile)      | Loads and parses a [Project](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project) from a file on disk.                             |
| [SaveToFile(string)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.savetofile)                  | Saves a [Project](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project) as JSON-formatted text to a file on disk.                   |

## Properties

| Name                                                                                                                                                               | Description                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AllowLanguagePreviewFeatures](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.allowlanguagepreviewfeatures) | Gets or sets a value indicating whether compiler features that are not intended for production use are allowed.                                                                                                                                                |
| [BaseLanguage](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.baselanguage)                                 | Gets or sets the base language of the project, as an IETF BCP-47 language tag.                                                                                                                                                                                 |
| [CompilerOptions](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.compileroptions)                           | Gets or sets a dictionary containing instructions that control how the Yarn Spinner compiler should compile a project.                                                                                                                                         |
| [Definitions](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.definitions)                                   | Gets or sets the path to a JSON file containing command and function definitions that this project references.                                                                                                                                                 |
| [DefinitionsFiles](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.definitionsfiles)                         | Gets the absolute paths to the project's Definitions files.                                                                                                                                                                                                    |
| [DefinitionsPath](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.definitionspath)                           | Gets the path to the Definitions file, relative to this project's location.                                                                                                                                                                                    |
| [ExcludeFilePatterns](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.excludefilepatterns)                   | Gets or sets the collection of file search patterns that should be excluded from this project.                                                                                                                                                                 |
| [ExtensionData](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.extensiondata)                               | Contains any data parsed from the source file that was not matched to a property on this type.                                                                                                                                                                 |
| [FileVersion](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.fileversion)                                   | Gets or sets the file version of the project.                                                                                                                                                                                                                  |
| [Localisation](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.localisation)                                 | Gets or sets the collection of [LocalizationInfo](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.localizationinfo) objects that store information about where localized data for this project is found. |
| [Path](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.path)                                                 | Gets the path that the [Project](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project) was loaded from.                                                                                                                             |
| [SourceFilePatterns](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.sourcefilepatterns)                     | Gets or sets the collection of file search patterns used to locate Yarn files that form this project.                                                                                                                                                          |
| [SourceFiles](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.sourcefiles)                                   | Gets the collection of Yarn files that should be used to compile the project.                                                                                                                                                                                  |
| [WorkspaceRootPath](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.compiler/yarn.compiler.project/yarn.compiler.project.workspacerootpath)                       | The location of the root of the workspace in which this project is located.                                                                                                                                                                                    |
