C# Scripting Component Custom Class Casting Error

Hi,

I am on Rhino8 WIP(8.0.22152.04306, 2022-06-01) on Mac. I have a definition that shares a DLL assembly between C# components through casting, which works just fine in Rhino7. When I open it in Rhino8 WIP, It works fine until the code gets refreshed or edited. Please see attached movie clip.

To reproduce, 1) build a dll assembly with custom classes in Visual Studio, 2) load the assembly on the c# components in grasshopper, 3) have them exchange the instances of the custom class using cast.

The error message that I got was as below which is odd as [A] and [B] are identical.

error: [A]SK_DtCntrStndrdMdl_ClssLbrr.DesignVariable cannot be cast to [B]SK_DtCntrStndrdMdl_ClssLbrr.DesignVariable. Type A originates from ‘SK_DtCntrStndrdMdl_ClssLbrr, Version=1.0.8188.3586, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location ‘/Users/woojsung/SynologyDrive/02_PROJECTS/2022/20211118_SK/Work/20220506_Work/SK_DtCntrStndrdMdl_ClssLbrr.dll’. Type B originates from ‘SK_DtCntrStndrdMdl_ClssLbrr, Version=1.0.8188.3586, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location ‘/Users/woojsung/SynologyDrive/02_PROJECTS/2022/20211118_SK/Work/20220506_Work/SK_DtCntrStndrdMdl_ClssLbrr.dll’. (line: 0)

@dale, @brian, @nathanletwory, @Alain

Could you please take a look at this? Thanks, W

Just so you know, it seems like it happens in a random fashion - I don’t know what triggers the error.