Skip to content

Commit 4b74cbb

Browse files
committed
has_dotnet: only check safe versions
1 parent 71d8610 commit 4b74cbb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

+stdlib/has_dotnet.m

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
%% HAS_DOTNET check if .NET is available
2-
function tf = has_dotnet()
2+
%
3+
% .NET support in Matlab for macOS and Linux became available in R2025a.
4+
% Ref: % https://www.mathworks.com/help/releases/R2024b/matlab/matlab_external/system-requirements-for-using-matlab-interface-to-net.html
35

4-
tf = ~stdlib.isoctave() && ~isMATLABReleaseOlderThan('R2023a') && NET.isNETSupported;
6+
function y = has_dotnet()
7+
8+
y = false;
9+
10+
if stdlib.isoctave, return, end
11+
12+
if ~ispc() && isMATLABReleaseOlderThan('R2024b'), return, end
13+
14+
y = NET.isNETSupported;
515

616
end

0 commit comments

Comments
 (0)