After fighting with roslyn codes for few weeks, made some breakthrough yesterday. 😄
Changed to use some simpler classes and able to get the script compilation done. Able to get it running under 2020.5 and .Net Core.
Will be testing more samples to ensure it is fully working.