gaborhodi
gaborhodi

Reputation: 164

Matlab standalon application with loaded .net framework

I'm building my Matlab code as a standalone application (exe) using the following command

mcc -v -N -p -m runMyCode.m

I use Matlab 2022b which supports .net 5+.

When I run runMyCode.exe then I log the output of dotnetenv. I states that .NET Framework 4.0.30319.42000 is loaded. The problem is that for some reason .NET is "loaded" at the entry point so if I add dotnetenv("core"), it produces an error: .NET is loaded. To change the environment, restart MATLAB then call dotnetenv. If I run the exe again, .NET Framework is still loaded.

What I noticed is that if I open Matlab, run dotnetenv("core") and then run mcc then .NET Core is loaded within the exe. Is there a way to tell mcc what .NET version to be used for building the exe or at least build it in a way that .NET is not loaded?

Upvotes: 0

Views: 26

Answers (0)

Related Questions