MATLAB: When building any model for Simulink Real-Time with Windows SDK 7.1, why do I get a “Specified key is invalid” error during the “Processing Template Makefile” step

When building any model for Simulink Real-Time with Windows SDK 7.1, why do I get a "Specified key is invalid" error during the "Processing Template Makefile" step?

Best Answer

On Windows, some registry keys are accessed during the Simulink Real-Time build process, and here, those have not been set properly.
These registry keys are configured by .NET Framework 4.0, which is required when using Windows SDK 7.1, as per the Supported Compilers documentation for MATLAB R2016a.
Note that Windows SDK 7.1 is no longer supported for Simulink Real-Time starting in R2016b.
If installing .NET Framework 4.0 does not resolve the error, please contact MathWorks Technical Support.