> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ScaffoldOptions

> The validated inputs for `dotnet easyaf new`: the solution namespace, target framework, and which optional projects to include.

## Definition

**Assembly:** CloudNimble.EasyAF.Tools.dll

**Namespace:** CloudNimble.EasyAF.Tools.Scaffolding

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.EasyAF.Tools.Scaffolding.ScaffoldOptions
```

## Summary

The validated inputs for `dotnet easyaf new`: the solution namespace, target framework, and which optional
projects to include.

## Constructors

### &#x20;.ctor

Initializes a new instance of the [ScaffoldOptions](https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Scaffolding/ScaffoldOptions) class.

#### Syntax

```csharp theme={"dark"}
public ScaffoldOptions(string namespace, System.Version toolVersion, int dotNetVersion = 11, bool includeApi = true, bool includeMessageBus = true, bool includeRuntime = true, bool webJob = false, bool toolIsPrerelease = false)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `namespace` | `string` | The solution namespace; every dot-separated segment must be a C# identifier. |
| `toolVersion` | `System.Version` | The version of the EasyAF tool creating the solution; its major version is the EasyAF version referenced. |
| `dotNetVersion` | `int` | The .NET major version to target: `10` or `11`. |
| `includeApi` | `bool` | Whether to create the `.Api` project. |
| `includeMessageBus` | `bool` | Whether to create the `.MessageBus.*` projects. |
| `includeRuntime` | `bool` | Whether to create the `.MessageBus.Runtime` project. |
| `webJob` | `bool` | Whether to stamp Azure WebJob publish metadata on the runtime. |
| `toolIsPrerelease` | `bool` | Whether the EasyAF tool is a prerelease, so EasyAF packages float to prereleases. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | Thrown when *toolVersion* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |
| `ArgumentException` | Thrown when an argument is invalid or the flags conflict. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;Company

Gets the first namespace segment (for example `CloudNimble` for `CloudNimble.Contoso`), used for package metadata.

#### Syntax

```csharp theme={"dark"}
public string Company { get; }
```

#### Property Value

Type: `string`

### &#x20;DotNetVersion

Gets the .NET major version every project targets (for example `11`).

#### Syntax

```csharp theme={"dark"}
public int DotNetVersion { get; }
```

#### Property Value

Type: `int`

### &#x20;EasyAFPackageVersion

Gets the version range every EasyAF package reference in a new solution uses: the tool's major version (`5.*`), floating
to prereleases (`5.*-*`) when the tool is a prerelease, so the solution restores the matching packages.

#### Syntax

```csharp theme={"dark"}
public string EasyAFPackageVersion { get; }
```

#### Property Value

Type: `string`

### &#x20;IncludeApi

Gets a value indicating whether the `.Api` project (and its test project) is created.

#### Syntax

```csharp theme={"dark"}
public bool IncludeApi { get; }
```

#### Property Value

Type: `bool`

### &#x20;IncludeMessageBus

Gets a value indicating whether the `.MessageBus.*` projects are created.

#### Syntax

```csharp theme={"dark"}
public bool IncludeMessageBus { get; }
```

#### Property Value

Type: `bool`

### &#x20;IncludeRuntime

Gets a value indicating whether the `.MessageBus.Runtime` project is created. Always [`false`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool)
when [ScaffoldOptions.IncludeMessageBus](https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Scaffolding/ScaffoldOptions#includemessagebus) is [`false`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

#### Syntax

```csharp theme={"dark"}
public bool IncludeRuntime { get; }
```

#### Property Value

Type: `bool`

### &#x20;MicrosoftPackageVersion

Gets the version that Microsoft.Extensions and EF Core packages float to for [ScaffoldOptions.TargetFramework](https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Scaffolding/ScaffoldOptions#targetframework).

#### Syntax

```csharp theme={"dark"}
public string MicrosoftPackageVersion { get; }
```

#### Property Value

Type: `string`

### &#x20;Namespace

Gets the solution namespace (for example `CloudNimble.Contoso`); every project name starts with it.

#### Syntax

```csharp theme={"dark"}
public string Namespace { get; }
```

#### Property Value

Type: `string`

### &#x20;Product

Gets the last namespace segment (for example `Contoso`), used in class, configuration, and WebJob names.

#### Syntax

```csharp theme={"dark"}
public string Product { get; }
```

#### Property Value

Type: `string`

### &#x20;TargetFramework

Gets the target framework moniker every project uses (for example `net11.0`).

#### Syntax

```csharp theme={"dark"}
public string TargetFramework { get; }
```

#### Property Value

Type: `string`

### &#x20;WebJob

Gets a value indicating whether Azure WebJob publish metadata is stamped on the `.MessageBus.Runtime` project.

#### Syntax

```csharp theme={"dark"}
public bool WebJob { get; }
```

#### Property Value

Type: `bool`

## Methods

### &#x20;CreateTokens

Creates the token values the embedded scaffold resources are rendered with.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.IReadOnlyDictionary<string, string> CreateTokens(string sdkVersion, int year)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `sdkVersion` | `string` | The .NET SDK version to pin in `global.json`. |
| `year` | `int` | The copyright year. |

#### Returns

Type: `System.Collections.Generic.IReadOnlyDictionary<string, string>`
The tokens keyed by placeholder name.

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.