# 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

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

Example: `core`

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`

.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 5.0.7"`

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\5.0.16\"```