Working with legacy c# component in Rhino8

Hi,

I got this error message with the legacy c# component in Rhino8. Any fix for it?

To reproduce, make a gh file with c# component in Rhino7, and open it up in Rhino8. Then open the editor and close it.

Thanks,

W

IIRC legacy scripting components are not supported with .NET 7 currently

Okay. Thanks for the reply. But it seems to be working fine except for the error message. Do you see any potential problems with using the legacy component in Rh8?

The old C#/VB component uses the CodeDom compiler from .NET Framework which is removed from the latest .NET. So Grasshopper’s scripting components need to adapt to the new Roslyn compiler.

I suppose the scripting components are hidden in Rhino WIP right now because they don’t fully work. The exact behavior of running old components on WIP is unknown to me.

Hi Woojae -

I can’t reproduce that behavior here with a random gh file with a C# component, so that looks to be file-specific.

In case this is related to .NET 7, does that file behave differently when you run the Rhino SetDotNetRuntime command to switch to NETFramework instead of the default NETCore? You’ll have to restart Rhino…
-wim

oh, i am on mac. SetDotNetRuntime doesn’t work on mac

Hi Woojae -

Testing with that same gh file that I used on Windows, I’m still not seeing the issue that you described on my Mac. Can you post a gh file with a C# script that behaves like this?
-wim

btw is Rhino 8 going to be shipped with .NET 7? It’s not LTS.

Yes, I raised and confirmed this with the team at the May Developer conference, Rhino 8 will ship with .Net 7

1 Like

Hi Wim,

Please see the file. It was created in Rh7 mac and tested with the error in Rh8 mac.

Thanks,
W

test1.gh (1.9 KB)

@woojsung following your description, making a Rhino 7 gh file with C# and opening that in V8, does not give me the errors you are seeing, nor with the file you posted. Neither on Win or Mac.

@Gijs

Thanks for checking this out. Have you updated to the latest version of Rhino8? I checked the file in Version 8 WIP (8.0.23241.14306, 2023-08-29) working fine, but the latest version(Version 8 WIP (8.0.23248.12306, 2023-09-05)) spits out the error. Please see attached.

I have a couple of Mac machines (Intel and M1) and it looks like it happens everywhere in the latest WIP.

Thanks,

W

Hi Woojae -

I’m not seeing that error here on my Intel Mac running Version 8 (8.0.23249.22302, 2023-09-06).
-wim

Mine is 8.0.23248.12306, 2023-09-05, which is the problematic version, I suppose. How can I get 8.0.23249.22302, 2023-09-06?

@Gijs @wim

I still see the issue with the latest Rh8 beta, please see attached. Thanks,

Hi,
Thanks for reporting the problem. Could you post the complete error messages?

Hi @Alain ,

I only can capture it as it doesn’t allow copying the message.

Hey @woojsung,

I can replicate the problem here too and created RH-77024 to get that fixed up.

Thanks for reporting the issue.

Curtis.

2 Likes

.NET 6 would only have given 6 months more of support, which ends on November 12, 2024 whereas .NET 7 is May 14, 2024. We didn’t feel that was enough for us to justify using one over the other.

I thought Rhino 8 is going to be release with .NET 8. :sweat_smile:

1 Like