dotnet / dotnet/msbuild

MSBuild::NormalizePath does not correctly canocalize paths containing back-slashes on xplat

Open
#5,114 0 comments 1 reaction 0 assignees View on GitHub
triaged xplat
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Steps to reproduce

Project file
```xml



$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)..\test'))
$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)../test'))



```

On Windows, the result is:

```
D:\test D:\test
```

On Ubuntu, this is what I get:

```
/mnt/d/utemp/../test /mnt/d/test
```

This is not a problem since the File I/O APIs would resolve either paths. However, in this particular I was trying to remove an item from an ItemGroup using it's canonicalized path.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.