Main Content

NETEnvironment

.NET environment information

Since R2022b

    Description

    NETEnvironment objects contain information about the settings and status of the .NET environment. The .NET environment information is persistent across different MATLAB® sessions.

    Creation

    To create a NETEnvironment object or change the settings, call dotnetenv. You cannot change the run-time after MATLAB loads the environment. To change the environment, restart MATLAB, and then call dotnetenv.

    Properties

    expand all

    This property is read-only.

    .NET run-time environment, returned as framework or core. To set the run-time environment, call dotnetenv with the version argument.

    Example: core

    This property is read-only.

    Process status, returned as loaded or notloaded. The run-time is loaded when you call functions in either the NET or System packages.

    Example: loaded

    This property is read-only.

    .NET version, returned as a string. This information is available after the run-time is loaded. If the value is "", then Status is notloaded.

    Example: ".NET 6.0.25"

    This property is read-only.

    Folder for run-time environment, returned as a string. This information is available after the run-time is loaded. If the value is "", then Status is notloaded.

    Example: "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.25\"

    Version History

    Introduced in R2022b

    See Also