Why does System.Dia​gnostics.P​rocess not work? Matlab and .Net-Framework Problem

조회 수: 9 (최근 30일)
Hello Community,
i am trying to use some Functions that use System.Diagnostics.Process (e.g. sim3d.Engine.engine, Vehicle Dynamics Blockset). This used to work on my Notebook and Desktop. However since i updated one PC to the newest Windows Version 1903, functions with System.Diagnostics.Process dont work on this machine anymore. I assume it has something to do with the .Net Framework. I tried a clean re-install of windows 10, but the problem persists. I compered both .Net Installations (regedit) and they seem to be identical.
This is the actual function i want to use:
>> sim3d.Engine.engine
Error using sim3d.Engine/setup %this should be red (error)
Invalid default value for property 'engine' in class 'sim3d.Engine': %this should be red
No method 'Start' with matching signature found for class 'System.Diagnostics.Process'. %this should be red
Error in sim3d.Engine %this should be red
And this is the general approach to run System.Diagnostics.Process
A = NET.isNETSupported
notepad = System.Diagnostics.Process();
notepad.StartInfo.FileName = "notepad.exe";
notepad.StartInfo.UseShellExecute = false;
notepad.StartInfo.CreateNoWindow = true;
notepad.Start;
The result:
A =
1
No method 'Start' with matching signature found for class 'System.Diagnostics.Process'. %this should be red (error)
The actual function i want to use: %this should be red
So what exact Version of the .Net-Framework is required for Matlab? Maybe the Problem is the relativly new Framework 4.8? Or could it be that the path /variable to the .Net directory is messed up? Im out of ideas.
Thanks, Mathias

채택된 답변

Mathias Voigt
Mathias Voigt 2019년 9월 27일
The Bug has been fixed.
Solution is on Bug Report 2075910 (Link):
https://de.mathworks.com/support/bugreports/2075910
  댓글 수: 3
Mathias Voigt
Mathias Voigt 2019년 10월 9일
Hi Michael,
you are right the Solution has been removed from the Bug Reports Page. The fix will be included in the next Matlab Update, that seems to be released soon.
Look at the post from on of the developers (8 Oct 2019):
If you cant wait for the update, maybe contact the developer directly. Im sure they can provide the bugfix for you.
For your info: The bugfix replaced the "Engine.p" file that is called with sim3d.Engine
I hope i could help you.
Martijn
Martijn 2020년 1월 30일
Note that the original question discussed two issues, clearly related, but which were eventually addressed in two separate bug reports:
1. In certain places like Simulink 3D Animation, System.Dia​gnostics.P​rocess.Start was used internally, this is discussed in:
2. If you yourself are directly working with System.Dia​gnostics.P​rocess.Start, see:
Which also discusses a workaround: Use Start(p) instead of p.Start()

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by