[Core] Fix NRE in TargetFramework