-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as duplicate of#11442
Closed as duplicate of#11442
Copy link
Description
Describe the bug
If the project folder has @ in the name, files with <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> doesn't get copied to the output directory. This works in 9.0.105, but is broken in 9.0.203.
This causes broken builds for us because Jenkins uses @2 in folder names when the same pipeline is running multiples times in parallel.
To Reproduce
#!/bin/bash
rm -rf consoleapp@2
dotnet new console -o consoleapp@2
cd consoleapp@2
dotnet new globaljson --sdk-version 9.0.203 --roll-forward disable
touch test.txt
cat > consoleapp@2.csproj <<EOF
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Update="test.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
EOF
dotnet build -v diag
ls bin/Debug/net9.0/test.txt
Fails with ls: cannot access 'bin/Debug/net9.0/test.txt': No such file or directory
Metadata
Metadata
Assignees
Labels
No labels