Fix Microsoft.DotNet.Build.Tasks.Packaging adding duplicate / to extensionless PackageFiles
Open
help wanted
- Dominant language
- C#
- Stars
- 729
- Forks
- 397
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 149
Description
https://github.com/dotnet/arcade/blob/c379ca997a3baf98e7e974c420d18997113eb345/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets#L479-L485
This code adds a `/` even if one already exists, causing paths like `tools//crossgen`.
This is a problem when some `PackageFile`s are generated via `**` where `RecursiveDir` needs to be preserved, like in Core-Setup where I have a workaround:
```xml
<_ToolsToPackage Include="$(_runtimePackageDir)tools/**/*.*"/>
$(_runtimePackageId)
$([System.String]::new('tools/%(RecursiveDir)').TrimEnd('/'))
true
```
Contributor guide
Assessment
This issue has not been assessed yet.