dotnetenv needs DOTNET_ROOT to detect .NET on Linux, macOS

10 ビュー (過去 30 日間)
scivision
scivision 2025 年 7 月 21 日
編集済み: scivision 2025 年 7 月 23 日
This is a solution to an undocumented issue:
dotnetenv() documentation (or anywhere else on mathworks.com) doesn't mention that environment variable DOTNET_ROOT is vital for Matlab to detect the .NET installation, particularly on non-Windows platforms newly supported for .NET.
If anyone is having an issue getting Matlab to detect their .NET installation, particularly on macOS or Linux:
from system Terminal: dotnet --info
in Matlab, if getenv("DOTNET_ROOT") isn't set or doesn't match dotnet --info:
setenv("DOTNET_ROOT", <DOTNET_ROOT path from dotnet --info>)
in Matlab: dotnetenv("core", Version=<major version .NET installed>)

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Microsoft .NET についてさらに検索

タグ

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by