MATLAB: ‘IDENTIFIER input must be a valid MATLAB message identifier’ error when I try to build a simulink model to Speedgoat performance, Can connect to the target from development PC (ping it), and run model but get error on model build

erroridentifiers;MATLABmexceptionr2018asimulinkSimulink Real-Timeslrt_make_rtw_hookspeedgoat

I'm using Matlab R2018a and connecting to a speedgoat performance. I'm trying to build a simulink model (very simple, sine to scope) and download it to the speedgoat performance, but receive an error
'The call to slrt_make_rtw_hook, during the exit hook generated the following error:
IDENTIFIER input must be a valid MATLAB message identifier. For more information, read about MException Identifiers in the MATLAB help.
The build process will terminate as a result.
Caused by:
IDENTIFIER input must be a valid MATLAB message identifier. For more information, read about MException Identifiers in the MATLAB help.
Component:Simulink | Category:Block diagram error
### Download model onto target: TargetPC1'
I'm able to run the model in normal mode, but unable to build the model. I'm also able to connect to the target PC and able to ping it.
How would I solve this error? I'm using VS2015 as my compiler.

Best Answer

This can be solved by doing a kernal transfer