Rhino 7 COM type library - name still says Rhino 6

I just noticed that the Rhinoceros Type library, which has version 7.0, is called “Rhinoceros 6 Type Library”.
I’m sure it works as expected, but I did take a double take here.
image

Also, the Interop.Rhino.dll and Interop.RhinoScript.dll assemblies have version 6.0.0.0

Hi @menno,

The Rhinoceros 6 Type Library description is a bug in the Rhino installer. It’s on the list to fix.

I’ll look into why interop assemblies are being version as 6.0.0.0.

Thanks,

– Dale

1 Like
                //const string rhino_id = "Rhino.Application.7";
                const string rhino_id = "Rhino.Application";
                var type_id = Type.GetTypeFromProgID(rhino_id);
                m_Rhino = Activator.CreateInstance(type_id);
            }
            catch
            {
                // ignored
            }

            if (null == m_Rhino)
            {
                WriteLog("Failed to create Rhino application 7");
                return;
            }

            // Wait until Rhino is initialized before calling into it
            const int bail_milliseconds = 15 * 1000;
            var time_waiting = 0;
            while (0 == m_Rhino.IsInitialized())
            {
                Thread.Sleep(100);
                time_waiting += 100;
                if (time_waiting > bail_milliseconds)
                {
                    Console.WriteLine("Rhino initialization failed");
                    return;
                }
            }

When execute m_Rhino.IsInitialized() : Getting exception

"‘System.__ComObject’ does not contain a definition for ‘IsInitialized’"

Interop.Rhino : CLDID: 8c16e736-d2b9-409d-80de-cecfbfbc90f6
Interop.RhinoScript : CLSID: 75b1e1b4-8caa-43c3-975e-373504024fdb

Similar code works fine for “Rhino.Application.6”

Please help

No idea, sorry…

Solution 1 :
1] Create Console Application in Visual Studio 2017
2] Add References to Rhino 7 Type Library and Add Reference to RhinoScript 7 Type library

Solution 2 :
1] Create Console Application in Visual Studio 2019
2] Add References to Rhino 7 Type Library and Add Reference to RhinoScript 7 Type library
Change Target Framework to “.NET 5.0”

Here Rhino 7 works fine be get exception for Shift-JIS encoding

InnerException {"‘shift_jis’ is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter ‘name’)"} System.Exception {System.ArgumentException}
Solution :

//https://stackoverflow.com/questions/40331957/shift-jis-encoding-for-a-netstandard-library
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
System.Text.Encoding.GetEncoding(“Shift-JIS”);

Rhino 7 uses the .NET Framework 4.8.

– Dale

Thanks J