Body
Environment
- OS: Windows 11 Enterprise (22631)
- mxcli version: v0.21.0 (2026-09-06)
- Mendix Studio Pro: 11.11.0 installed at
C:\Program Files\Mendix\11.11.0\
- Shell: Git Bash (MSYS2 on Windows)
- Author: Clinton Chee DI SW GS&CS MXRM APAC PRS T2
Summary
mxcli test --local on Windows downloads a Linux ELF mxbuild binary into
%USERPROFILE%\.mxcli\mxbuild\{version}\modeler\mxbuild. This binary cannot
execute on Windows. There is no --mxbuild-path flag, no MXCLI_MXBUILD_PATH
environment variable, and no other mechanism to redirect mxcli to the Windows
mxbuild.exe already present in the Studio Pro installation. The result is that
mxcli test --local is entirely non-functional on Windows.
Steps to reproduce
- Windows machine with Studio Pro 11.x installed (
mxbuild.exe at
C:\Program Files\Mendix\{version}\modeler\mxbuild.exe)
- Run
mxcli test tests/ -p MyApp.mpr --local
- mxcli downloads a Linux ELF binary to
%USERPROFILE%\.mxcli\mxbuild\{version}\modeler\mxbuild
- mxcli attempts to execute it; the process fails to start
Observed error:
Error: local runtime: starting mxbuild serve: mxbuild --serve did not become ready: mxbuild --serve exited during startup
--- mxbuild output ---
(empty -- Linux ELF cannot execute on Windows)
What was attempted (and why it made things worse)
This issue was encountered by Claude Code (AI coding assistant,
claude-sonnet-4-6) working autonomously on behalf of a developer. In
attempting to unblock mxcli test --local, Claude Code made the following
modifications to %USERPROFILE%\.mxcli\mxbuild\11.11.0\modeler\:
| Action |
File |
| Renamed (backup) |
mxbuild -> mxbuild.linux |
| Added |
mxbuild -- copy of Studio Pro mxbuild.exe (Windows PE32+, 174 KB) |
| Added |
mxbuild.exe -- same copy |
| Replaced |
mxbuild.runtimeconfig.json -- changed from includedFrameworks (self-contained/Linux) to framework (framework-dependent, targets installed .NET 10) |
| Added |
e_sqlite3.dll -- native SQLite DLL from Studio Pro runtimes\win-x64\native\ |
| Added |
runtimes\win-x64\native\e_sqlite3.dll -- same DLL |
| Added |
tools\deno\win-x64\deno.exe -- copied from Studio Pro (121 MB) |
This produced a mixed Linux/Windows cache that is fragile, unsupported, and will
be silently destroyed the next time mxcli re-downloads mxbuild for this version.
The developer's environment has been left in a degraded state. This entire chain
of manual surgery would have been avoided by a single --mxbuild-path flag or
env var.
Root cause
mxcli test --local discovers mxbuild exclusively from its own internal cache
(%USERPROFILE%\.mxcli\mxbuild\) with no override mechanism. On Windows, it
downloads a Linux-targeted binary rather than the Windows binary. The Windows
mxbuild.exe is already present in the Studio Pro installation but is
unreachable by mxcli.
Note: the mxcli project toolkit (_common.sh) already implements a correct
resolution order -- $MXBUILD_PATH -> Studio Pro install -> cache -- for its
own gate scripts. The same logic does not exist inside the mxcli binary itself.
Suggested fixes (in order of preference)
-
--mxbuild-path flag / MXCLI_MXBUILD_PATH env var on
mxcli test --local (and mxcli run --local) -- lets the caller point
directly at Studio Pro's mxbuild.exe. Mirrors what the toolkit's
_common.sh already does with $MXBUILD_PATH.
-
Platform-correct download on Windows -- when mxcli detects it is running
on Windows, download the Windows mxbuild package rather than the Linux one.
-
Auto-discover Studio Pro on Windows before downloading -- mirror
find_mxbuild() from _common.sh: check
C:\Program Files\Mendix\{version}\modeler\mxbuild.exe before falling back
to a download.
Additional suggestion: DevContainer / Windows cache isolation
If the Linux mxbuild cache at ~/.mxcli/mxbuild/ is intended for use inside a
DevContainer (where a Linux runtime is available), and the DevContainer mounts
or symlinks ~/.mxcli/mxbuild from the Windows host's
%USERPROFILE%\.mxcli\mxbuild, that mount causes the Linux stack to appear at
the Windows path -- which is exactly what triggered this issue.
Proposed alternative: keep the Linux mxbuild cache inside the
DevContainer's own filesystem rather than mounting it from the Windows host. The
Linux binaries are only useful inside the container; exposing them on the Windows
host profile creates the confusion described above. If the DevContainer must
share state with the host, a separate mount point (e.g.
~/.mxcli/mxbuild-linux/) would avoid polluting the Windows-side path that
mxcli also reads.
Expected behaviour
mxcli test --local on Windows should either:
- (a) auto-discover and use the Studio Pro
mxbuild.exe, or
- (b) accept a
--mxbuild-path flag / MXCLI_MXBUILD_PATH env var, or
- (c) print a clear, actionable error explaining that the cached binary is not
executable on this platform and describing how to supply a Windows binary --
rather than silently downloading a non-runnable Linux binary and failing with an
opaque startup error.
Body
Environment
C:\Program Files\Mendix\11.11.0\Summary
mxcli test --localon Windows downloads a Linux ELF mxbuild binary into%USERPROFILE%\.mxcli\mxbuild\{version}\modeler\mxbuild. This binary cannotexecute on Windows. There is no
--mxbuild-pathflag, noMXCLI_MXBUILD_PATHenvironment variable, and no other mechanism to redirect mxcli to the Windows
mxbuild.exealready present in the Studio Pro installation. The result is thatmxcli test --localis entirely non-functional on Windows.Steps to reproduce
mxbuild.exeatC:\Program Files\Mendix\{version}\modeler\mxbuild.exe)mxcli test tests/ -p MyApp.mpr --local%USERPROFILE%\.mxcli\mxbuild\{version}\modeler\mxbuildObserved error:
What was attempted (and why it made things worse)
This issue was encountered by Claude Code (AI coding assistant,
claude-sonnet-4-6) working autonomously on behalf of a developer. Inattempting to unblock
mxcli test --local, Claude Code made the followingmodifications to
%USERPROFILE%\.mxcli\mxbuild\11.11.0\modeler\:mxbuild->mxbuild.linuxmxbuild-- copy of Studio Promxbuild.exe(Windows PE32+, 174 KB)mxbuild.exe-- same copymxbuild.runtimeconfig.json-- changed fromincludedFrameworks(self-contained/Linux) toframework(framework-dependent, targets installed .NET 10)e_sqlite3.dll-- native SQLite DLL from Studio Proruntimes\win-x64\native\runtimes\win-x64\native\e_sqlite3.dll-- same DLLtools\deno\win-x64\deno.exe-- copied from Studio Pro (121 MB)This produced a mixed Linux/Windows cache that is fragile, unsupported, and will
be silently destroyed the next time mxcli re-downloads mxbuild for this version.
The developer's environment has been left in a degraded state. This entire chain
of manual surgery would have been avoided by a single
--mxbuild-pathflag orenv var.
Root cause
mxcli test --localdiscovers mxbuild exclusively from its own internal cache(
%USERPROFILE%\.mxcli\mxbuild\) with no override mechanism. On Windows, itdownloads a Linux-targeted binary rather than the Windows binary. The Windows
mxbuild.exeis already present in the Studio Pro installation but isunreachable by mxcli.
Note: the mxcli project toolkit (
_common.sh) already implements a correctresolution order --
$MXBUILD_PATH-> Studio Pro install -> cache -- for itsown gate scripts. The same logic does not exist inside the mxcli binary itself.
Suggested fixes (in order of preference)
--mxbuild-pathflag /MXCLI_MXBUILD_PATHenv var onmxcli test --local(andmxcli run --local) -- lets the caller pointdirectly at Studio Pro's
mxbuild.exe. Mirrors what the toolkit's_common.shalready does with$MXBUILD_PATH.Platform-correct download on Windows -- when mxcli detects it is running
on Windows, download the Windows mxbuild package rather than the Linux one.
Auto-discover Studio Pro on Windows before downloading -- mirror
find_mxbuild()from_common.sh: checkC:\Program Files\Mendix\{version}\modeler\mxbuild.exebefore falling backto a download.
Additional suggestion: DevContainer / Windows cache isolation
If the Linux mxbuild cache at
~/.mxcli/mxbuild/is intended for use inside aDevContainer (where a Linux runtime is available), and the DevContainer mounts
or symlinks
~/.mxcli/mxbuildfrom the Windows host's%USERPROFILE%\.mxcli\mxbuild, that mount causes the Linux stack to appear atthe Windows path -- which is exactly what triggered this issue.
Proposed alternative: keep the Linux mxbuild cache inside the
DevContainer's own filesystem rather than mounting it from the Windows host. The
Linux binaries are only useful inside the container; exposing them on the Windows
host profile creates the confusion described above. If the DevContainer must
share state with the host, a separate mount point (e.g.
~/.mxcli/mxbuild-linux/) would avoid polluting the Windows-side path thatmxcli also reads.
Expected behaviour
mxcli test --localon Windows should either:mxbuild.exe, or--mxbuild-pathflag /MXCLI_MXBUILD_PATHenv var, orexecutable on this platform and describing how to supply a Windows binary --
rather than silently downloading a non-runnable Linux binary and failing with an
opaque startup error.