Skip to content

dotnetenv

ffi · scripts/ffi/dotnetenv.m

: env = dotnetenv ()
: env = dotnetenv (name, value, …)

Report or configure the default .NET runtime environment (MATLAB dotnetenv parity).

Query form returns a scalar struct with fields matching the MATLAB DotNETEnvironment surface used by call sites that inspect Runtime, Version, Status, and Home:

  • Runtime — "core" (preferred hostfxr path, nexus#12993)
  • Version — empty until a CLR host is linked
  • Status — "notloaded" while NET.isNETSupported is false
  • Home — empty until a host reports a runtime home
  • Frameworks — empty cell until a host enumerates frameworks

Name-value keys accepted for the set form (subset of R2026a): "Runtime" ("core" or "framework") and "Version" (character row / string scalar). Settings are remembered for the session, but changing them does not load a CLR until the host in nexus#12993 lands; NET.isNETSupported stays false and mutators under NET.* keep their clear error path.