With both Xcode 12.4 (from the App Store) and with Xcode 12.5 beta 2 (only installed after having those problems with Xcode 12.4) I get the following errors when trying to build a project (newly created simple "Hello World" project) under Big Sur 11.2.2 (Intel):
<unknown>:0: error: invalid Darwin version number: macos11.2
<unknown>:0: error: invalid version number in '--target=x86_64-apple-macos11.2'
<unknown>:0: error: invalid Darwin version number: macos11.3
<unknown>:0: error: invalid version number in '--target=x86_64-apple-macos11.3'
<unknown>:0: error: failed to load module 'Combine'
<unknown>:0: error: invalid Darwin version number: macos11.3
<unknown>:0: error: invalid version number in '--target=x86_64-apple-macos11.3'
(Before installing Xcode 12.5 beta 2 the error was "invalid Darwin version number: macos11.1 ...".)
Note: I am not including "Combine".
I searched for solutions in the internet but nothing I found helped. Right now I am not able to build Swift projects (at least not in Xcode). What can I do to fix this?
Additional question: How can I ensure that the swiftc versions for Xcode and in the command line (terminal) are the same? They seemed to differ.