.NET project file analyzers community

Proj0023: Use forward slashes in paths

The use of forward slashes (/) is preferred as they work both for UNIX and Windows. This is not true for backward slashes (\).

Non-compliant

<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\props\simple.props" />
  
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\common\Code.cs" Link="Include\Code.cs" />
  </ItemGroup>

  <ItemGroup>
    <None Remove="Files\*" />
  </ItemGroup>

</Project>

Compliant

<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="../props/simple.props" />
  
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="../common/Code.cs" Link="Include/Code.cs" />
  </ItemGroup>

  <ItemGroup>
    <None Remove="Files/*" />
  </ItemGroup>

</Project>