Grasshopper Interface How to

I am testing Rhino8 Inside

            Rhino.PlugIns.PlugIn.PlugInExists(GH_InId, out bool loaded, out bool loadProtected);
            if (!loaded) return;
            Rhino.PlugIns.PlugInInfo info = Rhino.PlugIns.PlugIn.GetPlugInInfo(GH_InId);
            Rhino.PlugIns.PlugIn ghPlugin = Rhino.PlugIns.PlugIn.Find(GH_InId);
            Rhino.Commands.Command [] commands = ghPlugin.GetCommands();

I am unable to Get the ScriptInterface as doing in v 7

the cast does not seem to work as before
gh = (Grasshopper.Plugin.GH_RhinoScriptInterface)ghPlugin;

How to get the ScriptInterface ?

Gerry

sorry the cast was

gh = (Grasshopper.Plugin.GH_RhinoScriptInterface)RhinoApp.GetPlugInObject(GH_InId);

but so far

Rhino.PlugIns.PlugIn ghPlugin = Rhino.PlugIns.PlugIn.Find(GH_InId);
returns null even if the plugin seem to be loaded

whats missing ?

Gerry

ok found the issue running Rhino with /netfx solved the problem

gerry