# Compiler Warning ASPIRECONTAINERSHELLEXECUTION001

<Badge
  text="Version introduced: 9.3"
  variant="note"
  size="large"
  class:list={'mb-1'}
/>

> The container shell execution property is experimental and subject to change or removal in future updates. Suppress this diagnostic to proceed.

The `ShellExecution` property on `ContainerResource` is an experimental feature that controls whether custom arguments should be wrapped for shell execution. When enabled, custom arguments are wrapped in `-c "values"` format for shell execution.

## Example

The following code generates `ASPIRECONTAINERSHELLEXECUTION001`:

```csharp title="C# — AppHost.cs"
var builder = DistributedApplication.CreateBuilder(args);

var container = builder.AddContainer("mycontainer", "myimage");
container.ShellExecution = true;
```

## To correct this warning

Suppress the warning with either of the following methods:

- Set the severity of the rule in the _.editorconfig_ file.

  ```ini title=".editorconfig"
  [*.{cs,vb}]
  dotnet_diagnostic.ASPIRECONTAINERSHELLEXECUTION001.severity = none
  ```

  For more information about editor config files, see [Configuration files for code analysis rules](/diagnostics/overview/#suppress-in-the-editorconfig-file).

- Add the following `PropertyGroup` to your project file:

  ```xml title="C# project file"
  <PropertyGroup>
      <NoWarn>$(NoWarn);ASPIRECONTAINERSHELLEXECUTION001</NoWarn>
  </PropertyGroup>
  ```

- Suppress in code with the `#pragma warning disable ASPIRECONTAINERSHELLEXECUTION001` directive:

  ```csharp title="C# — Suppressing the warning"
  #pragma warning disable ASPIRECONTAINERSHELLEXECUTION001
  container.ShellExecution = true;
  #pragma warning restore ASPIRECONTAINERSHELLEXECUTION001
  ```