Why does calling a MATLAB .NET assembly compiled after R2017b alter the process Path?
Show older comments
I've compiled a simple .NET assembly using the MATLAB Compiler SDK Library Compiler. I've also written a .NET application in Visual Studio, which calls this assembly.
In the app I add some entries to the Process Path using the "Environment.SetEnvironmentVariable" method, then I call into the MATLAB .NET assembly.
When I compile the MATLAB .NET assembly in R2017b or earlier, everything works as expected. However, if I compile the assembly in a release later than R2017b all entries that I add to the process Path before calling into the compiled assembly are removed upon instantiation of the compiled assembly. It appears that during this function evaluation, the process Path is replaced with a copy of the machine Path.
Is this expected? Why has this behavior changed between releases?
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Compiler SDK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!