MATLAB: Am I unable to compile the Simulink Real-Time model to the Real-Time target with R2016a

I am trying to run a Simulink model on my Simulink Real-Time target with R2016a. While it worked correctly in previous versions of Simulink Real-Time, with R2016a I receive an error message:
 
"mkusrdlm.exe has stopped working"
What can I do to prevent this?

Best Answer

Simulink Real-Time R2016a does detect the Visual Studio 2015 compiler, but does not support it. You need to choose a different compiler. If you have other supported C/C++ compilers installed, you can use "slrtsetCC" to choose the one that should be used with Simulink Real-Time. For instance if you have Visual Studio 2013 installed in the default location: "C:\Program Files (x86)\Microsoft Visual Studio 12.0", you can use:
slrtsetCC('VisualC', 'C:\Program Files (x86)\Microsoft Visual Studio 12.0')
The list of supported compilers can be found at the following link:
Related Question