DioxusLabs/dioxus

`dx serve --hot-patch` on Windows 11 cannot generate binary outside of VS command prompt

Open

#4911 opened on Nov 5, 2025

View on GitHub
 (1 comment) (1 reaction) (0 assignees)Rust (36,038 stars) (1,655 forks)batch import
bughelp wantedsubsecondwindows

Description

Problem

A freshly created, barebones desktop project on Windows, launched with dx serve --hot-patch will fail to build with a number of linker errors looking for core windows libraries.

Steps To Reproduce

  • open any terminal that is not the VS 2022 Native Tools Command Prompt
    • for the purposes of this report, I have tried nushell, Powershell, and a vanilla Command Prompt
  • create a new Dioxus project with dx new
  • Bare-Bones for sub-template
  • false for Dioxus Fullstack
  • false for Dioxus Router
  • false for Tailwind CSS
  • false for LLM prompts
  • Desktop for Platform
  • cd to new project directory
  • dx serve --hotpatch to run

The build will then fail when looking for system libraries:

22:51:23 [dev] Failed to generate fat binary: rust-lld: error: could not open 'shlwapi.lib': no such file or directory
rust-lld: error: could not open 'advapi32.lib': no such file or directory
rust-lld: error: could not open 'kernel32.lib': no such file or directory
rust-lld: error: could not open 'kernel32.lib': no such file or directory
rust-lld: error: could not open 'kernel32.lib': no such file or directory
rust-lld: error: could not open 'ntdll.lib': no such file or directory
rust-lld: error: could not open 'userenv.lib': no such file or directory
rust-lld: error: could not open 'ws2_32.lib': no such file or directory
rust-lld: error: could not open 'dbghelp.lib': no such file or directory
rust-lld: error: could not open 'uuid.lib': no such file or directory
rust-lld: error: could not open 'ole32.lib': no such file or directory
22:51:23 [dev] Build failed: Failed to read file: The system cannot find the file specified. (os error 2)
               1: The system cannot find the file specified. (os error 2)

However, running under the x64 Native Tools Command Prompt, the project will build and run just as expected, so this will function as a workaround.

Expected behavior

I expect that dx serve --hot-patch on Windows will function the same no matter matter the shell, assuming that regular rust programs are able the be compiled and run under those same shell environments with no modifications.

Environment:

  • Dioxus version: 0.7.0, main branch for dx-cli Windows launch fix
  • Rust version: 1.91.0 (f8297e351 2025-10-28)
  • OS info: Windows 11
  • App platform: Desktop

Contributor guide