﻿---
title: curb_xml_format
description: Format project, props, targets, solution and nuget.config files. false leaves them unread. Defaults to `true`
url: https://docs-v3-preview.elastic.dev/reference/xml/files/curb_xml_format
---

# curb_xml_format
Format project, props, targets, solution and nuget.config files. false leaves them unread.

## Values


| Value   | Notes |
|---------|-------|
| `true`  |       |
| `false` |       |

**Default:** `true`
On by default. The first run changes some project files, all of them whitespace, so `curb check` fails until you run `curb format .` once. To turn XML formatting off for a whole repository, add a section for the files to the root `.editorconfig`:
```ini
[*.{csproj,fsproj,vbproj,proj,props,targets,slnx,config}]
curb_xml_format = false
```


### `curb_xml_format = true`

```ini
curb_xml_format = true
```

<tab-set>
  <tab-item title="Before">
    ```xml
    <Project Sdk="Microsoft.NET.Sdk">
        <PropertyGroup>
          <TargetFramework>net10.0</TargetFramework>
            <Description>
              Kept exactly as written: MSBuild reads this whitespace.
            </Description>
        </PropertyGroup>



      <ItemGroup>
        <PackageReference Include="A"/>
        <PackageReference   Include="B"   Version="1.0" />
      </ItemGroup>
    </Project>
    ```
  </tab-item>

  <tab-item title="After">
    ```xml
    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>net10.0</TargetFramework>
            <Description>
              Kept exactly as written: MSBuild reads this whitespace.
            </Description>
      </PropertyGroup>

      <ItemGroup>
        <PackageReference Include="A"/>
        <PackageReference Include="B" Version="1.0" />
      </ItemGroup>
    </Project>
    ```
  </tab-item>
</tab-set>


### `curb_xml_format = false`

```ini
curb_xml_format = false
```

<tab-set>
  <tab-item title="Before">
    ```xml
    <Project Sdk="Microsoft.NET.Sdk">
        <PropertyGroup>
          <TargetFramework>net10.0</TargetFramework>
            <Description>
              Kept exactly as written: MSBuild reads this whitespace.
            </Description>
        </PropertyGroup>



      <ItemGroup>
        <PackageReference Include="A"/>
        <PackageReference   Include="B"   Version="1.0" />
      </ItemGroup>
    </Project>
    ```
  </tab-item>

  <tab-item title="After">
    ```xml
    <Project Sdk="Microsoft.NET.Sdk">
        <PropertyGroup>
          <TargetFramework>net10.0</TargetFramework>
            <Description>
              Kept exactly as written: MSBuild reads this whitespace.
            </Description>
        </PropertyGroup>



      <ItemGroup>
        <PackageReference Include="A"/>
        <PackageReference   Include="B"   Version="1.0" />
      </ItemGroup>
    </Project>
    ```
  </tab-item>
</tab-set>