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