Open
Description
<Project>
<Target Name="CopyMissingFileOnItself">
<Copy SourceFiles="Directory\and\file\that\does\not\exist.txt" DestinationFiles="Directory\and\file\that\does\not\exist.txt" />
</Target>
</Project>
❯ msbuild -v:d
MSBuild version 17.8.0-preview-23418-03+0125fc9fb for .NET Framework
Build started 8/21/2023 3:21:46 PM.
Process = "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\MSBuild.exe"
MSBuild executable path = "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\MSBuild.exe"
Command line arguments = ""C:\Program Files\Microsoft Visual Studio\2022\Preview\\MSBuild\Current\Bin\amd64\MSBuild.exe
" -v:d"
Current directory = "S:\play\alkejtlk"
MSBuild version = "17.8.0-preview-23418-03+0125fc9fb"
Some command line switches were read from the auto-response file "C:\Program Files\Microsoft Visual Studio\2022\Preview
\MSBuild\Current\Bin\amd64\MSBuild.rsp". To disable this file, use the "-noAutoResponse" switch.
Assembly loaded during Evaluation: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5
f7f11d50a3a (location: C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\System.Collections.Imm
utable.dll, MVID: 5f9ff90f-0d16-4469-a104-76829d3705e2, AppDomain: [Default])
Project "S:\play\alkejtlk\foo.proj" on node 1 (default targets).
Target "CopyMissingFileOnItself" in project "S:\play\alkejtlk\foo.proj" (entry point):
Using "Copy" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f
11d50a3a".
Task "Copy"
Done executing task "Copy".
Done building target "CopyMissingFileOnItself" in project "foo.proj".
Done Building Project "S:\play\alkejtlk\foo.proj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.03
. . . but that file doesn't exist. Feels like we should error in that case.