Selecting .NET Core in MATLAB
MATLAB® supports loading .NET assemblies, including:
.NET Framework (Microsoft® Windows®)
.NET, including .NET Core (Microsoft Windows, macOS, and Linux®)
For details, see System Requirements for Using MATLAB Interface to .NET. For information about .NET versions compatible with MATLAB, see MATLAB Interfaces to Other Languages.
By default, MATLAB loads assemblies using .NET Framework on Microsoft
Windows, and using .NET Core on macOS and Linux. To select .NET Core on Microsoft
Windows, use the dotnetenv
function. The .NET environment information is persistent across different MATLAB sessions.
To select the .NET Core run-time environment, type:
netDate = System.DateTime.Now; % Load .NET ne = dotnetenv("core")
ne = NETEnvironment with properties: Runtime: core Status: loaded Version: ".NET 6.0.25" RuntimeLocation: "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.25\"
Functions
dotnetenv | Change .NET default environment (Since R2022b) |
Objects
NETEnvironment | .NET environment information (Since R2022b) |
Topics
- Migrating from .NET Framework to .NET Core
Match .NET API with .NET run-time environment.