but Swift still is not available, swift -version returns nothing:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\purpln> swift.exe -version
PS C:\Users\purpln> where.exe swift
C:\Users\purpln\AppData\Local\Programs\Swift\Toolchains\6.1.2+Asserts\usr\bin\swift.exe
PS C:\Users\purpln> C:\Users\purpln\AppData\Local\Programs\Swift\Toolchains\6.1.2+Asserts\usr\bin\swift.exe -version
PS C:\Users\purpln> swift -version
PS C:\Users\purpln>
libraries installed:
MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (v14.44-17.14)
MSVC v143 - VS 2022 C++ x64/x86 build tools (v1444-17.14)
Windows 11 SDK (10.0.26100.3916)
I would recommend not using PowerShell, particularly to ensure that things are working. Once the installer runs, starting a new CMD shell should have swift in the path (where swift should find the path). If that doesn't, then the installer is silently failing. The logs should help shed light on what is failing.
Also, please provide more information about where you are running this. Is this ARM64 or X64?
PowerShell Swift started to responding on swift -version, CMD - doesn't.
Still fails on building. Compiles SwiftPM successfully, but there are errors on linking:
lld-link: error: could not open 'msvcrt.lib': no such file or directory
lld-link: error: could not open 'oldnames.lib': no such file or directory
lld-link: error: could not open 'msvcprt.lib': no such file or directory
every setting is default enabled only symbolic links at last step;
installed Visual Studio Community edition from official website with:
MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (v14.44-17.14)
MSVC v143 - VS 2022 C++ x64/x86 build tools (v1444-17.14)
Windows 11 SDK (10.0.26100.6584)
installed Swift 6.2 release with swift exe installer from swift.org;
Difference from the previous try:
swift command was found immediately, was no need to setup setx PATH;
swift command works in both CMD and PowerShell;
swift -version outputs succesfully;
But still getting same error on swift run command:
lld-link: error: could not open 'msvcrt.lib': no such file or directory
lld-link: error: could not open 'oldnames.lib': no such file or directory
lld-link: error: could not open 'msvcprt.lib': no such file or directory
Immediate update - just added C++ CMake tools for Windows to Visual Studio components and everything started working fine except unable to create symbolic link at warning. But this is not vital problem. I don't have For Developers option in Windows settings, maybe I would need to dig into some registers to enable symbolic links.
For "most" development with Swift, you do not need symbolic links, you then just get the mentioned warning and you have to look a little bit deeper inside the .build folder for the products (the convenient .build\release and .build\debug folders will not be there).
For how to enable the development mode see there, in fact what you want is the SeCreateSymbolicLinkPrivilege to enable symbolic links (test via mklink newfile oldfile , creating a symbolic link file named newfile pointing to oldfile).
That does indicate that that the C++ components are required. The CMake tools happen to just pull in the same components. If there is something there that could be made clearer, a PR to improve that would be appreciated.
The „should“ on that page sounds like something optional, but it isn‘t. The more precise (albeit unfriendlier) word would be „must“, but then it should be added if it must be precisely the listed versions, so I think the text change should be done by someone who really knows…