I generally like the fact that Csharpier picks up XML files now, however some formatting rules are a bit questionable.
Input:
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
</PropertyGroup>
Output:
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<IsTrimmable
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))"
>true</IsTrimmable
>
<IsAotCompatible
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))"
>true</IsAotCompatible
>
</PropertyGroup>
Expected behavior:
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<IsTrimmable
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))"
>true</IsTrimmable>
<IsAotCompatible
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))"
>true</IsAotCompatible>
</PropertyGroup>
Or, probably better:
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<IsTrimmable
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
<IsAotCompatible
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
</PropertyGroup>
Additionally, why does CSharpier remove empty newlines in XML? I think newlines are useful to separate certain element blocks, like <ItemGroup>.
I generally like the fact that Csharpier picks up XML files now, however some formatting rules are a bit questionable.
Input:
Output:
Expected behavior:
Or, probably better:
Additionally, why does CSharpier remove empty newlines in XML? I think newlines are useful to separate certain element blocks, like
<ItemGroup>.