# Windows

**URL:** https://forums.swift.org/c/platform/windows/67.md?page=1

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

**Page:** 2

---

## [RFC: Adding google/brotli dependency to Windows toolchain](https://forums.swift.org/t/rfc-adding-google-brotli-dependency-to-windows-toolchain/82251)

<div class="topic-metadata">

**Author:** [@lizhenchao](https://forums.swift.org/u/lizhenchao)\
**Replies:** 2\
**Last updated:** [September 23, 2025, 12:36am UTC](https://forums.swift.org/t/rfc-adding-google-brotli-dependency-to-windows-toolchain/82251 "2025-09-23T00:36:36Z")

</div>

Hi, While working on Add brotli support to FoundationNetworking by zhenchaoli · Pull Request #83441 · swiftlang/swift · GitHub we realized that we need to add google/brotli as a dependency to the Windows toolchain. So I…

---

## [WinSDK - definition of constants](https://forums.swift.org/t/winsdk-definition-of-constants/82229)

<div class="topic-metadata">

**Author:** [@euantorano](https://forums.swift.org/u/euantorano)\
**Replies:** 2\
**Last updated:** [September 19, 2025, 3:39pm UTC](https://forums.swift.org/t/winsdk-definition-of-constants/82229 "2025-09-19T15:39:42Z")

</div>

I’ve been experimenting with Swift on Windows a little bit, and found that there seems to be an error in the type specification for a couple of constants: Constant Name Defined Type Expected Type GENERIC\_READ UI…

---

## [An unofficial guide to building the Swift toolchain on Windows (x64 and ARM64)](https://forums.swift.org/t/an-unofficial-guide-to-building-the-swift-toolchain-on-windows-x64-and-arm64/81751)

<div class="topic-metadata">

**Author:** [@c\_zablit](https://forums.swift.org/u/c_zablit)\
**Replies:** 4\
**Last updated:** [August 21, 2025, 8:33pm UTC](https://forums.swift.org/t/an-unofficial-guide-to-building-the-swift-toolchain-on-windows-x64-and-arm64/81751 "2025-08-21T20:33:50Z")

</div>

Introduction This is an unofficial guide on how to build Swift on Windows (x64 and/or ARM64). Its main goal is to provide the exact versions for the tools used by the CI bots to build the Swift toolchain on Windows. Win…

---

## [Crash getting creation date from url / file manager (when file is \> 2gb)](https://forums.swift.org/t/crash-getting-creation-date-from-url-file-manager-when-file-is-2gb/73367)

<div class="topic-metadata">

**Author:** [@mikewoodworth](https://forums.swift.org/u/mikewoodworth)\
**Replies:** 4\
**Last updated:** [August 10, 2025, 4:31am UTC](https://forums.swift.org/t/crash-getting-creation-date-from-url-file-manager-when-file-is-2gb/73367 "2025-08-10T04:31:22Z")

</div>

Hello all, I've spent all day beating my head against a crash in my windows build of this cross platform app. Here's the problem line: let values = try url.resourceValues(forKeys: \[.nameKey, .creationDateKey, .content…

---

## [Compile without msvc](https://forums.swift.org/t/compile-without-msvc/81366)

<div class="topic-metadata">

**Author:** [@heloonihao](https://forums.swift.org/u/heloonihao)\
**Replies:** 2\
**Last updated:** [July 29, 2025, 3:26pm UTC](https://forums.swift.org/t/compile-without-msvc/81366 "2025-07-29T15:26:04Z")

</div>

like rust,it can choose which one i prefers,i can unistall stable-x86\_64-pc-windows-msvc,and using stable-x86\_64-pc-windows-gnu,its possible on now ?

---

## [Console Application argument is empty](https://forums.swift.org/t/console-application-argument-is-empty/80527)

<div class="topic-metadata">

**Author:** [@softwarehangar7](https://forums.swift.org/u/softwarehangar7)\
**Replies:** 2\
**Last updated:** [July 17, 2025, 11:33am UTC](https://forums.swift.org/t/console-application-argument-is-empty/80527 "2025-07-17T11:33:31Z")

</div>

I'm trying to create a console application that receives arguments. When I debug it in VSCode and insert the arguments in in the launch.json, it works perfectly. But when using the windows console or powershell, callin…

---

## [UserDefaults.standard on Windows stores plist file in AppData/Local](https://forums.swift.org/t/userdefaults-standard-on-windows-stores-plist-file-in-appdata-local/81072)

<div class="topic-metadata">

**Author:** [@markokh](https://forums.swift.org/u/markokh)\
**Replies:** 9\
**Last updated:** [July 15, 2025, 2:42pm UTC](https://forums.swift.org/t/userdefaults-standard-on-windows-stores-plist-file-in-appdata-local/81072 "2025-07-15T14:42:10Z")

</div>

It seems that UserDefaults.standard works on Windows, but the settings are persisted with a file called .plist in the AppData/Local directory (or it is named for the executable if the bundle identifier is not set). When …

---

## [Question: Is Swift ABI stable on Windows? How far are we from there?](https://forums.swift.org/t/question-is-swift-abi-stable-on-windows-how-far-are-we-from-there/59601)

<div class="topic-metadata">

**Author:** [@stevapple](https://forums.swift.org/u/stevapple)\
**Replies:** 15\
**Last updated:** [July 9, 2025, 6:18pm UTC](https://forums.swift.org/t/question-is-swift-abi-stable-on-windows-how-far-are-we-from-there/59601 "2025-07-09T18:18:30Z")

</div>

Just out of curiosity — MSVC has been stated to be ABI compatible for 7 years by the time, so it seems an achievable and reasonable goal to reach ABI stability on top of it. Once ABI stability on Windows is a thing, we …

---

## [VS Code won't run Swift on Windows](https://forums.swift.org/t/vs-code-wont-run-swift-on-windows/72721)

<div class="topic-metadata">

**Author:** [@dave256](https://forums.swift.org/u/dave256)\
**Replies:** 102\
**Last updated:** [May 30, 2025, 5:25am UTC](https://forums.swift.org/t/vs-code-wont-run-swift-on-windows/72721 "2025-05-30T05:25:30Z")

</div>

I teach computer science and have been trying to get Swift to work on one of my student's Windows computer. It's running Windows 11. We've installed the Swift toolchain, VS Code, and the Swift Extension (which also insta…

---

## [Swift C++ interop and Windows](https://forums.swift.org/t/swift-c-interop-and-windows/79713)

<div class="topic-metadata">

**Author:** [@clarkezone](https://forums.swift.org/u/clarkezone)\
**Replies:** 6\
**Last updated:** [May 12, 2025, 9:32pm UTC](https://forums.swift.org/t/swift-c-interop-and-windows/79713 "2025-05-12T21:32:26Z")

</div>

Hello all, I'm just starting to look at swift on windows and wanted to start looking at what C++ interop exists, eg how to call into c++ libraries. Does anyone know of any samples of this that I can kick the tires of? …

---

## [Error: toolchain is invalid: could not find CLI tool \`link\` at any of these directories](https://forums.swift.org/t/error-toolchain-is-invalid-could-not-find-cli-tool-link-at-any-of-these-directories/79364)

<div class="topic-metadata">

**Author:** [@himeshi](https://forums.swift.org/u/himeshi)\
**Replies:** 11\
**Last updated:** [April 22, 2025, 9:52am UTC](https://forums.swift.org/t/error-toolchain-is-invalid-could-not-find-cli-tool-link-at-any-of-these-directories/79364 "2025-04-22T09:52:26Z")

</div>

I installed Swift on windows using WinGet as described in Swift.org - Installation via Windows Package Manager . Then I tried swift test with my CLI tool project, which compiles successfully on macOS and Linux, and got t…

---

## [URLSession.upload(for:from:)](https://forums.swift.org/t/urlsession-upload-for/79225)

<div class="topic-metadata">

**Author:** [@kdeda](https://forums.swift.org/u/kdeda)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 2:37pm UTC](https://forums.swift.org/t/urlsession-upload-for/79225 "2025-04-11T14:37:37Z")

</div>

I have a command line tool written in Swift 6.1 that runs on Mac and Windows 11 (ARM), running inside a VM, M1 Pro. The following works well for small files, say 100 KB. let response = try await URLSession.shared.upl…

---

## [FileManager contentsOfDirectory fails on root volume](https://forums.swift.org/t/filemanager-contentsofdirectory-fails-on-root-volume/78104)

<div class="topic-metadata">

**Author:** [@mikewoodworth](https://forums.swift.org/u/mikewoodworth)\
**Replies:** 8\
**Last updated:** [April 10, 2025, 7:34pm UTC](https://forums.swift.org/t/filemanager-contentsofdirectory-fails-on-root-volume/78104 "2025-04-10T19:34:39Z")

</div>

Im sure this is user error, but I can't seem to get the contents of a volume on windows. print("\\(fileURL)") let directoryContents = try FileManager.default.contentsOfDirectory(at: fileURL) throws with Error Domain=NSC…

---

## [\`tcrun\` - managing swift toolchains on Windows](https://forums.swift.org/t/tcrun-managing-swift-toolchains-on-windows/77580)

<div class="topic-metadata">

**Author:** [@compnerd](https://forums.swift.org/u/compnerd)\
**Replies:** 10\
**Last updated:** [February 23, 2025, 3:25pm UTC](https://forums.swift.org/t/tcrun-managing-swift-toolchains-on-windows/77580 "2025-02-23T15:25:19Z")

</div>

Hello Swift Windows Users, The Windows toolchain layout has always been designed to have multiple parallel toolchains installed. However, for the ease of use, the toolchain currently has a few environment settings that …

---

## [SwiftPM manifest API for Windows "deployment target"](https://forums.swift.org/t/swiftpm-manifest-api-for-windows-deployment-target/77920)

<div class="topic-metadata">

**Author:** [@jakepetroules](https://forums.swift.org/u/jakepetroules)\
**Replies:** 3\
**Last updated:** [February 17, 2025, 8:50pm UTC](https://forums.swift.org/t/swiftpm-manifest-api-for-windows-deployment-target/77920 "2025-02-17T20:50:35Z")

</div>

Today there is SwiftPM manifest API to set the minimum deployment target for each targeted Apple platform (macOS, iOS, tvOS, watchOS, visionOS, and DriverKit). However, other platforms have somewhat similar concepts of …

---

## [Towards \`-static-stdlib\` support on Windows](https://forums.swift.org/t/towards-static-stdlib-support-on-windows/77728)

<div class="topic-metadata">

**Author:** [@compnerd](https://forums.swift.org/u/compnerd)\
**Replies:** 3\
**Last updated:** [February 9, 2025, 1:39pm UTC](https://forums.swift.org/t/towards-static-stdlib-support-on-windows/77728 "2025-02-09T13:39:46Z")

</div>

Windows has partially supported static linking for a while now. It explicitly requires that modules declare their type at compile time: libraries are assumed to be dynamic unless otherwise indicated via the -static flag.…

---

## [Minimum supported development environment](https://forums.swift.org/t/minimum-supported-development-environment/77565)

<div class="topic-metadata">

**Author:** [@compnerd](https://forums.swift.org/u/compnerd)\
**Replies:** 26\
**Last updated:** [February 7, 2025, 5:04pm UTC](https://forums.swift.org/t/minimum-supported-development-environment/77565 "2025-02-07T17:04:02Z")

</div>

NOTE This is related to the compiler and not the runtime. As we start to look towards compiler performance on Windows, one thing that comes up is the idea of a minimum development environment. Beyond just the OS level r…

---

## [Is there a reason we can't install multiple toolchains on windows simultaneously?](https://forums.swift.org/t/is-there-a-reason-we-cant-install-multiple-toolchains-on-windows-simultaneously/76371)

<div class="topic-metadata">

**Author:** [@mikewoodworth](https://forums.swift.org/u/mikewoodworth)\
**Replies:** 23\
**Last updated:** [February 3, 2025, 7:40pm UTC](https://forums.swift.org/t/is-there-a-reason-we-cant-install-multiple-toolchains-on-windows-simultaneously/76371 "2025-02-03T19:40:32Z")

</div>

I'm trying to find the needle in the haystack that is a toolchain version that will successfully compile our project at the moment, and the process is made a bit slower by the fact I have to uninstall one toolchain befor…

---

## [Swift repl on windows: Error: could not create a swift AST context](https://forums.swift.org/t/swift-repl-on-windows-error-could-not-create-a-swift-ast-context/75887)

<div class="topic-metadata">

**Author:** [@ethindp](https://forums.swift.org/u/ethindp)\
**Replies:** 9\
**Last updated:** [January 11, 2025, 10:12pm UTC](https://forums.swift.org/t/swift-repl-on-windows-error-could-not-create-a-swift-ast-context/75887 "2025-01-11T22:12:33Z")

</div>

Hi all, I've installed Swift on Windows 10 (specifically, Windows 10 21H2 (AMD64) build 19044.5011, if that matters), with all the VS dependencies, but whenever I run the swift REPL (swift repl) I get the following outp…

---

## [Swift on Windows without Visual Studio?](https://forums.swift.org/t/swift-on-windows-without-visual-studio/63521)

<div class="topic-metadata">

**Author:** [@sspringer](https://forums.swift.org/u/sspringer)\
**Replies:** 50\
**Last updated:** [January 7, 2025, 10:25pm UTC](https://forums.swift.org/t/swift-on-windows-without-visual-studio/63521 "2025-01-07T22:25:33Z")

</div>

Edit: This is not about Visual Studio Code with the very fine Swift extension, but about Visual Studio as prerequisite for compiling Swift programs. First let me note that I do not regard the following as an “urgent” to…

---

## [How do I implement a \`DllMain\`?](https://forums.swift.org/t/how-do-i-implement-a-dllmain/76886)

<div class="topic-metadata">

**Author:** [@SlugFiller](https://forums.swift.org/u/SlugFiller)\
**Replies:** 47\
**Last updated:** [December 31, 2024, 10:59pm UTC](https://forums.swift.org/t/how-do-i-implement-a-dllmain/76886 "2024-12-31T22:59:10Z")

</div>

Or, alternately, how do I get the hInstance so I can create windows and dialogs? I tried the naive @MainActor @\_cdecl("DllMain") public func DllMain(hModule: HINSTANCE, reasonForCall: DWORD, lpReserved: LPVOID) -\> Wind…

---

## [Improving the distribution of Swift on Windows](https://forums.swift.org/t/improving-the-distribution-of-swift-on-windows/65358)

<div class="topic-metadata">

**Author:** [@compnerd](https://forums.swift.org/u/compnerd)\
**Replies:** 10\
**Last updated:** [December 20, 2024, 11:31pm UTC](https://forums.swift.org/t/improving-the-distribution-of-swift-on-windows/65358 "2024-12-20T23:31:31Z")

</div>

Windows is maturing, but there is a still a long path to get to the point where we should start thinking about ABI stability. Similar to how Apple platforms prior to ABI stability, Windows will require shipping the runt…

---

## [Shipping windows exe, where to source msvcp etc?](https://forums.swift.org/t/shipping-windows-exe-where-to-source-msvcp-etc/76445)

<div class="topic-metadata">

**Author:** [@mikewoodworth](https://forums.swift.org/u/mikewoodworth)\
**Replies:** 3\
**Last updated:** [December 17, 2024, 9:31pm UTC](https://forums.swift.org/t/shipping-windows-exe-where-to-source-msvcp-etc/76445 "2024-12-17T21:31:02Z")

</div>

Hello, Sorry for the long post, I'm not sure this is even a swift question, but my windows programming experience is slight enough that I don't know where else to look. We have been deploying a x-plat swift app on wind…

---

## [Getting "Failed to set breakpoint site at ..... Unable to write breakpoint trap to memory"](https://forums.swift.org/t/getting-failed-to-set-breakpoint-site-at-unable-to-write-breakpoint-trap-to-memory/76288)

<div class="topic-metadata">

**Author:** [@softwarehangar7](https://forums.swift.org/u/softwarehangar7)\
**Replies:** 0\
**Last updated:** [November 29, 2024, 1:51pm UTC](https://forums.swift.org/t/getting-failed-to-set-breakpoint-site-at-unable-to-write-breakpoint-trap-to-memory/76288 "2024-11-29T13:51:58Z")

</div>

I'm getting this message when trying to debug: "Failed to set breakpoint site at ..... Unable to write breakpoint trap to memory" None of my breakpoints are working now. Everything was working a couple os days ago. A…

---

## [Profile swift on Windows?](https://forums.swift.org/t/profile-swift-on-windows/69129)

<div class="topic-metadata">

**Author:** [@daniero](https://forums.swift.org/u/daniero)\
**Replies:** 2\
**Last updated:** [November 23, 2024, 8:49am UTC](https://forums.swift.org/t/profile-swift-on-windows/69129 "2024-11-23T08:49:46Z")

</div>

Hello, I was curious to know if, as the title said, there is any way to profile Swift code on Windows. Many thanks.

---

## [Use a C++ library built with MDd\_DynamicDebug?](https://forums.swift.org/t/use-a-c-library-built-with-mdd-dynamicdebug/75482)

<div class="topic-metadata">

**Author:** [@natinusala](https://forums.swift.org/u/natinusala)\
**Replies:** 1\
**Last updated:** [November 6, 2024, 1:33am UTC](https://forums.swift.org/t/use-a-c-library-built-with-mdd-dynamicdebug/75482 "2024-11-06T01:33:57Z")

</div>

Hello, I'm trying to link my Swift program (Swift 6.0.1) with a C++ library (in my case, Luau) built in debug mode, so with MDd\_DynamicDebug. If I try to do so,I have the following error: lld-link: error: /failifmismat…

---

## [How to generate symbol files when distributing release binaries on Windows?](https://forums.swift.org/t/how-to-generate-symbol-files-when-distributing-release-binaries-on-windows/73121)

<div class="topic-metadata">

**Author:** [@gregcotten](https://forums.swift.org/u/gregcotten)\
**Replies:** 7\
**Last updated:** [October 30, 2024, 5:30pm UTC](https://forums.swift.org/t/how-to-generate-symbol-files-when-distributing-release-binaries-on-windows/73121 "2024-10-30T17:30:31Z")

</div>

If I want to distribute a Swift Windows release-mode executable or dynamic library using SPM with most of the debug information in the binary itself stripped but want to be able to symbolicate minidumps, what do I do? D…

---

## [Difficulty Locating Code for Good First Issue in VS Code](https://forums.swift.org/t/difficulty-locating-code-for-good-first-issue-in-vs-code/75635)

<div class="topic-metadata">

**Author:** [@Anshika9gaur](https://forums.swift.org/u/Anshika9gaur)\
**Replies:** 0\
**Last updated:** [October 26, 2024, 1:04pm UTC](https://forums.swift.org/t/difficulty-locating-code-for-good-first-issue-in-vs-code/75635 "2024-10-26T13:04:24Z")

</div>

Hello Swift Community, I hope you are doing well. My name is Anshika, and I’ve found a good first issue to work on within the Swift project: "Offer additional note for why method with Self reference cannot be used on an…

---

## [Unloading .dll stalls when depending on swift-certificates](https://forums.swift.org/t/unloading-dll-stalls-when-depending-on-swift-certificates/75542)

<div class="topic-metadata">

**Author:** [@modmuss50](https://forums.swift.org/u/modmuss50)\
**Replies:** 2\
**Last updated:** [October 22, 2024, 9:00pm UTC](https://forums.swift.org/t/unloading-dll-stalls-when-depending-on-swift-certificates/75542 "2024-10-22T21:00:58Z")

</div>

Hi, I have a weird issue that I have been stuck on for a few days. Hopefully somone can provide some insight or at least some additional steps I can take to try and get to the bottom of this. I am building a Windows .dl…

---

## [Anyone else running into assert building for release](https://forums.swift.org/t/anyone-else-running-into-assert-building-for-release/75513)

<div class="topic-metadata">

**Author:** [@mikewoodworth](https://forums.swift.org/u/mikewoodworth)\
**Replies:** 1\
**Last updated:** [October 22, 2024, 5:46pm UTC](https://forums.swift.org/t/anyone-else-running-into-assert-building-for-release/75513 "2024-10-22T17:46:25Z")

</div>

Hello, Running into an issue trying to build my project in release config (works fine in debug). Anyone run into this, or have suggestions for workarounds/ places to look in my code to build a make a reproducible sample…

[Previous page](https://forums.swift.org/c/platform/windows/67.md)

[Next page](https://forums.swift.org/c/platform/windows/67.md?page=2)
