On Windows, building a package target that has resources copies the top-level files of the resource bundle (Info.plist and every resource) into the package root.
swift build -v shows the culprit, the "Touch" step for the bundle:
Touch Repro_Foo.bundle
cd C:\...
epro
C:\WINDOWS\system32\cmd.exe /c copy /b C:\...\Products\Debug-windows\Repro_Foo.bundle +,,
C:\...\Repro_Foo.bundle\hello.txt
C:\...\Repro_Foo.bundle\Info.plist
2 file(s) copied.
copy /b <file> +,, updates a file's timestamp, but when the argument is a directory copy instead copies every file in it into the current directory, which here is the package root (TouchTool.swift uses defaultWorkingDirectory).
Reproducer with CI: https://github.com/tothambrus11/swift-build-bundle-touch-repro (Package.swift with one target and resources: [.copy("Resources/hello.txt")]; after swift build --build-system swiftbuild, hello.txt and Info.plist sit next to Package.swift).
Seen with 6.4-dev locally and swift-DEVELOPMENT-SNAPSHOT-2026-05-20-a (6.5-dev) on windows-latest.
On Windows, building a package target that has resources copies the top-level files of the resource bundle (
Info.plistand every resource) into the package root.swift build -vshows the culprit, the "Touch" step for the bundle:copy /b <file> +,,updates a file's timestamp, but when the argument is a directorycopyinstead copies every file in it into the current directory, which here is the package root (TouchTool.swiftusesdefaultWorkingDirectory).Reproducer with CI: https://github.com/tothambrus11/swift-build-bundle-touch-repro (Package.swift with one target and
resources: [.copy("Resources/hello.txt")]; afterswift build --build-system swiftbuild,hello.txtandInfo.plistsit next toPackage.swift).Seen with 6.4-dev locally and
swift-DEVELOPMENT-SNAPSHOT-2026-05-20-a(6.5-dev) on windows-latest.