I'm having an "on again off again" relationship with Windows. Having this same issue on both of my machines and I have no idea why I'm getting link errors. I've gone over the setup process multiple times and did a full Visual Studio removal and reinstall.
C:\Test>swift --version compnerd.org Swift version 5.4-dev (LLVM 798a505f5bc4a05, Swift 7f7978370b08812) Target: x86_64-unknown-windows-msvc C:\Test>swift package init Creating library package: Test Creating Package.swift Creating README.md Creating .gitignore Creating Sources/ Creating Sources\Test\Test.swift Creating Tests/ Creating Tests\TestTests/ Creating Tests\TestTests\TestTests.swift C:\Test>swift build --product Test C:\Test: error: manifest parse error(s): lld-link: error: <root>: undefined symbol: mainCRTStartup lld-link: error: undefined symbol: memcpy >>> referenced by C:\Users\dustb\AppData\Local\Temp\Package-b6f103.o:($s18PackageDescription6TargetC10DependencyOWOb) clang: error: linker command failed with exit code 1 (use -v to see invocation) <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation) C:\Test>echo %SDKROOT% C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk C:\Test>echo %UniversalCRTSdkDir% C:\Program Files (x86)\Windows Kits\10\ C:\Test>echo %VCToolsInstallDir% C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\
Here's my visual studio setup: