xml_space_before_self_closing

Space before />. Unset keeps what each tag has, except in .slnx files, which always get one.

Value Notes
true
false

Default: (not set)

Unset, each tag keeps whether it had a space, and several spaces become one. Solution files always get one, the shape Visual Studio writes.

Ini
xml_space_before_self_closing = true
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>
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>
Ini
xml_space_before_self_closing = false
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>
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>