Rhino for Mac (WIP): Goodbye Mono, Hello .NET 6

Today’s RhinoWIP - 8.0.21292 - contains a BIG change on Mac that doesn’t really fit well into a line-item bullet-point…

Rhino 8 for Mac (still very much a Work-In-Progress) now uses Microsoft .NET 6.

(All previous versions of Rhino for Mac rely on Mono, an open source implementation of Microsoft’s .NET Framework.)

@curtisw has moved mountains to make this change possible and it forms a solid foundation for our cross-platform development going forward. I couldn’t let this pass without some acknowledgment.

It’s also a big change that touches many parts of Rhino. Our hope is you don’t notice any difference - aside perhaps from some speed-ups here and there - but - as with most changes of this magnitude - there is potential for breakage.

Thanks all for their testing so far and for reporting bugs.

15 Likes

Great! :grinning:

Will MAUI replace Eto?

I’m curious when we can see .NET 6 on windows. :thinking:

2 Likes

Unlikely.

At most it’ll be a new backend for the Eto framework, like WPF, Cocoa, etc.

1 Like

Hello Dan,

I notice that there are many classes are missing on RhinoWIP 8 on Mac M1. Do you know what causes the issue? for example, the whole Uri class is missing, please see the comparison below

if I “print(dir(System))” this is what I got on Mac

Microsoft.Scripting.Actions.NamespaceTracker:System
['AccessViolationException', 'Action', 'Activator', 'AggregateException', 'AppContext', 'AppDomain', 'AppDomainSetup', 'AppDomainUnloadedException', 'ApplicationException', 'ApplicationId', 'ArgIterator', 'ArgumentException', 'ArgumentNullException', 'ArgumentOutOfRangeException', 'ArithmeticException', 'Array', 'ArraySegment', 'ArrayTypeMismatchException', 'AssemblyLoadEventArgs', 'AssemblyLoadEventHandler', 'AsyncCallback', 'Attribute', 'AttributeTargets', 'AttributeUsageAttribute', 'BadImageFormatException', 'Base64FormattingOptions', 'BitConverter', 'Boolean', 'Buffer', 'Buffers', 'Byte', 'CLSCompliantAttribute', 'CannotUnloadAppDomainException', 'Char', 'CharEnumerator', 'CodeDom', 'Collections', 'Comparison', 'ComponentModel', 'Configuration', 'ContextBoundObject', 'ContextMarshalException', 'ContextStaticAttribute', 'Convert', 'Converter', 'CultureAwareComparer', 'DBNull', 'DataMisalignedException', 'DateOnly', 'DateTime', 'DateTimeKind', 'DateTimeOffset', 'DayOfWeek', 'Decimal', 'Delegate', 'Diagnostics', 'DivideByZeroException', 'DllNotFoundException', 'Double', 'Drawing', 'DuplicateWaitObjectException', 'EntryPointNotFoundException', 'Enum', 'Environment', 'EnvironmentVariableTarget', 'EventArgs', 'EventHandler', 'Exception', 'ExecutionEngineException', 'FieldAccessException', 'FlagsAttribute', 'FormatException', 'FormattableString', 'Func', 'GC', 'GCCollectionMode', 'GCGenerationInfo', 'GCKind', 'GCMemoryInfo', 'GCNotificationStatus', 'Globalization', 'Guid', 'Half', 'HashCode', 'IAdditionOperators', 'IAdditiveIdentity', 'IAsyncDisposable', 'IAsyncResult', 'IBinaryFloatingPoint', 'IBinaryInteger', 'IBinaryNumber', 'IBitwiseOperators', 'ICloneable', 'IComparable', 'IComparisonOperators', 'IConvertible', 'ICustomFormatter', 'IDecrementOperators', 'IDisposable', 'IDivisionOperators', 'IEqualityOperators', 'IEquatable', 'IFloatingPoint', 'IFormatProvider', 'IFormattable', 'IIncrementOperators', 'IMinMaxValue', 'IModulusOperators', 'IMultiplicativeIdentity', 'IMultiplyOperators', 'INumber', 'IO', 'IObservable', 'IObserver', 'IParseable', 'IProgress', 'IShiftOperators', 'ISignedNumber', 'ISpanFormattable', 'ISpanParseable', 'ISubtractionOperators', 'IUnaryNegationOperators', 'IUnaryPlusOperators', 'IUnsignedNumber', 'Index', 'IndexOutOfRangeException', 'InsufficientExecutionStackException', 'InsufficientMemoryException', 'Int16', 'Int32', 'Int64', 'IntPtr', 'InvalidCastException', 'InvalidOperationException', 'InvalidProgramException', 'InvalidTimeZoneException', 'Lazy', 'LoaderOptimization', 'LoaderOptimizationAttribute', 'LocalDataStoreSlot', 'MTAThreadAttribute', 'MarshalByRefObject', 'Math', 'MathF', 'MemberAccessException', 'Memory', 'MemoryExtensions', 'MethodAccessException', 'MidpointRounding', 'MissingFieldException', 'MissingMemberException', 'MissingMethodException', 'ModuleHandle', 'MulticastDelegate', 'MulticastNotSupportedException', 'Net', 'NonSerializedAttribute', 'NotFiniteNumberException', 'NotImplementedException', 'NotSupportedException', 'NullReferenceException', 'Nullable', 'Numerics', 'Object', 'ObjectDisposedException', 'ObsoleteAttribute', 'OperatingSystem', 'OperationCanceledException', 'OrdinalComparer', 'OutOfMemoryException', 'OverflowException', 'ParamArrayAttribute', 'PlatformID', 'PlatformNotSupportedException', 'Predicate', 'Progress', 'Random', 'Range', 'RankException', 'ReadOnlyMemory', 'ReadOnlySpan', 'Reflection', 'ResolveEventArgs', 'ResolveEventHandler', 'Resources', 'Runtime', 'RuntimeArgumentHandle', 'RuntimeFieldHandle', 'RuntimeMethodHandle', 'RuntimeTypeHandle', 'SByte', 'STAThreadAttribute', 'Security', 'SerializableAttribute', 'Single', 'Span', 'StackOverflowException', 'String', 'StringComparer', 'StringComparison', 'StringNormalizationExtensions', 'StringSplitOptions', 'SystemException', 'Text', 'ThreadStaticAttribute', 'Threading', 'TimeOnly', 'TimeSpan', 'TimeZone', 'TimeZoneInfo', 'TimeZoneNotFoundException', 'TimeoutException', 'Tuple', 'TupleExtensions', 'Type', 'TypeAccessException', 'TypeCode', 'TypeInitializationException', 'TypeLoadException', 'TypeUnloadedException', 'TypedReference', 'UInt16', 'UInt32', 'UInt64', 'UIntPtr', 'UnauthorizedAccessException', 'UnhandledExceptionEventArgs', 'UnhandledExceptionEventHandler', 'UnitySerializationHolder', 'ValueTuple', 'ValueType', 'Version', 'Void', 'WeakReference', 'Windows']
2.7.11 (2.7.11.1000)
[.NETCoreApp,Version=v3.1 on .NET 6.0.0-rtm.21522.10 (64-bit)]

compare with Rhino 8 on windows

Microsoft.Scripting.Actions.NamespaceTracker:System
['AccessViolationException', 'Action', 'ActivationContext', 'Activator', 'AggregateException', 'AppContext', 'AppDomain', 'AppDomainInitializer', 'AppDomainManager', 'AppDomainManagerInitializationOptions', 'AppDomainSetup', 'AppDomainUnloadedException', 'ApplicationException', 'ApplicationId', 'ApplicationIdentity', 'ArgIterator', 'ArgumentException', 'ArgumentNullException', 'ArgumentOutOfRangeException', 'ArithmeticException', 'Array', 'ArraySegment', 'ArrayTypeMismatchException', 'AssemblyLoadEventArgs', 'AssemblyLoadEventHandler', 'AsyncCallback', 'Attribute', 'AttributeTargets', 'AttributeUsageAttribute', 'BadImageFormatException', 'Base64FormattingOptions', 'BitConverter', 'Boolean', 'Buffer', 'Byte', 'CLSCompliantAttribute', 'CannotUnloadAppDomainException', 'Char', 'CharEnumerator', 'CodeDom', 'Collections', 'Comparison', 'ComponentModel', 'Configuration', 'Console', 'ConsoleCancelEventArgs', 'ConsoleCancelEventHandler', 'ConsoleColor', 'ConsoleKey', 'ConsoleKeyInfo', 'ConsoleModifiers', 'ConsoleSpecialKey', 'ContextBoundObject', 'ContextMarshalException', 'ContextStaticAttribute', 'Convert', 'Converter', 'CrossAppDomainDelegate', 'DBNull', 'DataMisalignedException', 'DateTime', 'DateTimeKind', 'DateTimeOffset', 'DayOfWeek', 'Decimal', 'Delegate', 'Deployment', 'Diagnostics', 'DivideByZeroException', 'DllNotFoundException', 'Double', 'Drawing', 'DuplicateWaitObjectException', 'EntryPointNotFoundException', 'Enum', 'Environment', 'EnvironmentVariableTarget', 'EventArgs', 'EventHandler', 'Exception', 'ExecutionEngineException', 'FieldAccessException', 'FileStyleUriParser', 'FlagsAttribute', 'FormatException', 'FormattableString', 'FtpStyleUriParser', 'Func', 'GC', 'GCCollectionMode', 'GCNotificationStatus', 'GenericUriParser', 'GenericUriParserOptions', 'Globalization', 'GopherStyleUriParser', 'Guid', 'HttpStyleUriParser', 'IAppDomainSetup', 'IAsyncResult', 'ICloneable', 'IComparable', 'IConvertible', 'ICustomFormatter', 'IDisposable', 'IEquatable', 'IFormatProvider', 'IFormattable', 'IO', 'IObservable', 'IObserver', 'IProgress', 'IServiceProvider', 'IndexOutOfRangeException', 'InsufficientExecutionStackException', 'InsufficientMemoryException', 'Int16', 'Int32', 'Int64', 'IntPtr', 'InvalidCastException', 'InvalidOperationException', 'InvalidProgramException', 'InvalidTimeZoneException', 'Lazy', 'LdapStyleUriParser', 'LoaderOptimization', 'LoaderOptimizationAttribute', 'LocalDataStoreSlot', 'MTAThreadAttribute', 'MarshalByRefObject', 'Math', 'Media', 'MemberAccessException', 'MethodAccessException', 'MidpointRounding', 'MissingFieldException', 'MissingMemberException', 'MissingMethodException', 'ModuleHandle', 'MulticastDelegate', 'MulticastNotSupportedException', 'Net', 'NetPipeStyleUriParser', 'NetTcpStyleUriParser', 'NewsStyleUriParser', 'NonSerializedAttribute', 'NotFiniteNumberException', 'NotImplementedException', 'NotSupportedException', 'NullReferenceException', 'Nullable', 'Object', 'ObjectDisposedException', 'ObsoleteAttribute', 'OperatingSystem', 'OperationCanceledException', 'OutOfMemoryException', 'OverflowException', 'ParamArrayAttribute', 'PlatformID', 'PlatformNotSupportedException', 'Predicate', 'Progress', 'Random', 'RankException', 'Reflection', 'ResolveEventArgs', 'ResolveEventHandler', 'Resources', 'Runtime', 'RuntimeArgumentHandle', 'RuntimeFieldHandle', 'RuntimeMethodHandle', 'RuntimeTypeHandle', 'SByte', 'STAThreadAttribute', 'Security', 'SerializableAttribute', 'Single', 'StackOverflowException', 'String', 'StringComparer', 'StringComparison', 'StringNormalizationExtensions', 'StringSplitOptions', 'SystemException', 'Text', 'ThreadStaticAttribute', 'Threading', 'TimeSpan', 'TimeZone', 'TimeZoneInfo', 'TimeZoneNotFoundException', 'TimeoutException', 'Timers', 'Tuple', 'TupleExtensions', 'Type', 'TypeAccessException', 'TypeCode', 'TypeInitializationException', 'TypeLoadException', 'TypeUnloadedException', 'TypedReference', 'UInt16', 'UInt32', 'UInt64', 'UIntPtr', 'UnauthorizedAccessException', 'UnhandledExceptionEventArgs', 'UnhandledExceptionEventHandler', 'Uri', 'UriBuilder', 'UriComponents', 'UriFormat', 'UriFormatException', 'UriHostNameType', 'UriIdnScope', 'UriKind', 'UriParser', 'UriPartial', 'UriTypeConverter', 'ValueTuple', 'ValueType', 'Version', 'Void', 'WeakReference', 'Web', 'Windows', '_AppDomain']
2.7.11 (2.7.11.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.4400.0 (64-bit)]

Thanks for reporting this. Logged in:

RH-66656 RhinoCommon: System.Uri not working

thanks! Dan. if I compare the two lists above (Mac and Windows) Uri is not the only class missing. there is the list of the classes that missing from ‘System’ of Mac

  ['UriBuilder', 'ConsoleKeyInfo', 'NewsStyleUriParser', 'IServiceProvider', 'Media', 'AppDomainManagerInitializationOptions', 'ConsoleModifiers', 'IAppDomainSetup', 'UriHostNameType', 'CrossAppDomainDelegate', 'ConsoleKey', 'ConsoleSpecialKey', 'UriKind', 'ActivationContext', 'UriParser', 'UriIdnScope', 'ConsoleCancelEventHandler', 'Web', 'Timers', 'LdapStyleUriParser', 'AppDomainInitializer', 'Deployment', 'NetPipeStyleUriParser', 'ConsoleColor', 'GopherStyleUriParser', 'UriFormatException', 'UriTypeConverter', 'GenericUriParser', 'UriComponents', 'NetTcpStyleUriParser', 'Console', 'ApplicationIdentity', 'Uri', 'AppDomainManager', 'ConsoleCancelEventArgs', 'FtpStyleUriParser', 'HttpStyleUriParser', 'GenericUriParserOptions', 'UriFormat', 'FileStyleUriParser', '_AppDomain', 'UriPartial']

RH-66656 is fixed in the latest WIP

1 Like

Awesome. Thank you!

1 Like

One more question about the.NET6. I found that “System.Windows.Forms.DataVisualization” is available in .NET Framework, but not in the.NET6. The Microsoft website mentions that this class can be migrated from .NET Framework into.NET6, but I don’t know how to do that as I’m running a MAC. Do you have any suggestions?

Hey @user2234, we do not plan to support System.Windows.Forms.DataVisualization on mac. If you need charting I would suggest to look at using OxyPlot with Eto.Forms, such as this one. Note that I haven’t tested this running in Rhino, but others have experimented with it here.

Does this mean that plugins will be cross platform automatically, or at least could be more easily ported between Windows and macOS?

This doesn’t change much as far as plugins are concerned. Many .NET based plugins are already cross platform. If a plugin author chooses to use a platform specific technology, then the plugin won’t be cross platform.

2 Likes

@stevebaer will there be a Nuget of RhinoCommon targeting net6? or Netstandard2.0 ? NuGet Gallery | RhinoCommon 7.24.22308.15001

1 Like

Probably not .NET 6 since we are looking to target .NET 7 now :slight_smile:

I’m not exactly sure what we will use for our nuget package. We are hoping to allow developers to be able to get their plug-ins to work in cases where .NET Framework 4.8 is being used (Rhino.Inside Revit) as well as in cases where .NET 7 is being used. We still need to figure out how to best deliver tools for developing/debugging under this new scenario.

1 Like

I suppose the only option would be .NET standard… :clown_face:

1 Like

Maybe the portability analyzer The .NET Portability Analyzer - .NET | Microsoft Learn can help to see potential problem in Rhinocommon ?