how do you specify which version of .NET is used
조회 수: 28 (최근 30일)
이전 댓글 표시
We have a requirement to communicate with our API from Matlab. We have found that it requires much more coding in Matlab to perform a task that we can do with a single line of code by referencing a .NET assembly. Calls which work in every other environment fail with a particular error, that we can replicate by calling the assembly from a .NET4.6.2 targeted application. This is pretty frustrating, and at this point it is a complete roadblock.
I would like to know if there is any way to control the version .NET used by the NET calls?
댓글 수: 0
답변 (1개)
Arpit Bhatia
2020년 10월 28일
Hi Cam,
Please refer to the below MATLAB Answers post on how to specify which version of .NET framework MATLAB uses.
댓글 수: 2
Arpit Bhatia
2020년 11월 2일
There is nothing in the MATLAB configuration that sets any specific .NET version, it is all picked by the Windows OS.
There are two configurations in .NET, one for the application, and one for the system. You can find the MATLAB configuration file in <matlabroot>/bin/win64/matlab.exe.config. The configuration (in MATLAB) is set to run 4.x.
To specify the version of .NET used, you can try to remove the dependency on MATLAB's configuration file and then check the system configuration file.
1) Temporarily eliminate the MATLAB configuration file as follows:
- Close MATLAB
- Rename the MATLAB.exe.config file to MATLAB.exe.config.backup
2) Edit the system or .NET application configuration files until the issue is resolved. The following link will help with different .NET configuration files, you may want to focus on the machine's configuration:
Note: After you are done with your task, please make sure to rename the file back to its original name.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!