# MissingParameterValueException Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [MissingParameterValueException](/reference/api/csharp/aspire.hosting/missingparametervalueexception.md)
- Kind: `Constructors`
- Members: `2`

The exception that is thrown when a parameter resource cannot be initialized because its value is missing or cannot be resolved.

## MissingParameterValueException(string)

- Name: `Constructor(string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/MissingParameterValueException.cs#L23-L25)

Initializes a new instance of the [MissingParameterValueException](/reference/api/csharp/aspire.hosting/missingparametervalueexception.md) class with a specified error message.

```csharp
public class MissingParameterValueException
{
    public MissingParameterValueException(
        string message)
    {
        // ...
    }
}
```

## Parameters

- `message` (`string`)
  The message that describes the error.

## MissingParameterValueException(string, Exception)

- Name: `Constructor(string, Exception)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/MissingParameterValueException.cs#L33-L35)

Initializes a new instance of the [MissingParameterValueException](/reference/api/csharp/aspire.hosting/missingparametervalueexception.md) class with a specified error message and a reference to the inner exception that is the cause of this exception.

```csharp
public class MissingParameterValueException
{
    public MissingParameterValueException(
        string message,
        Exception innerException)
    {
        // ...
    }
}
```

## Parameters

- `message` (`string`)
  The error message that explains the reason for the exception.
- `innerException` (`Exception`)
  The exception that is the cause of the current exception, or a null reference if no inner exception is specified.
