The other one is a little strange, I have an HTTP server written in C# (available on the package manager as DK_Http) - this just fails to receive form data back from the browser.
This is actually the Bengesht Http Server code (R6) recompiled to R8/dotnet 7.0. The Bengesht code actually works FINE in R9 - only the code compiled against the more modern framework fails?
I know its still early days on R9 but thought I’d better test early and often after all of the R7->R8 issues
In looking at DK_Http and trying with a simple example, it crashes with the following stack for me in both R8 and R9:
[ERROR] FATAL UNHANDLED EXCEPTION: ObjectiveCException.NSInternalInconsistencyException: Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.
at ObjCRuntime.Messaging.void_objc_msgSendSuper_NativeHandle(IntPtr receiver, IntPtr selector, NativeHandle arg1)
at ObjCRuntime.Messaging.void_objc_msgSendSuper_NativeHandle(IntPtr receiver, IntPtr selector, NativeHandle arg1)
at AppKit.NSWindow.set_Title(String value)
at System.Windows.Forms.Form.set_Text(String value)
at Grasshopper.GUI.GH_DocumentEditor.UpdateTitleText()
at Grasshopper.GUI.GH_DocumentEditor.Canvas_DocumentModifiedChanged(GH_Document sender, GH_DocModifiedEventArgs e)
at Grasshopper.GUI.Canvas.GH_Canvas.OnDocument_ModifiedChanged(Object sender, GH_DocModifiedEventArgs e)
at Grasshopper.Kernel.GH_Document.OnModifiedChanged()
at Grasshopper.Kernel.GH_Document.set_IsModified(Boolean Value)
at Grasshopper.Kernel.GH_Document.Modified()
at Grasshopper.Kernel.GH_Document.DocObjSolutionExpired(Object sender, GH_SolutionExpiredEventArgs e)
at Grasshopper.Kernel.GH_DocumentObject.OnSolutionExpired(Boolean recompute)
at Grasshopper.Kernel.GH_DocumentObject.OnSolutionExpired(Boolean recompute)
at Grasshopper.Kernel.GH_DocumentObject.ExpireSolution(Boolean recompute)
at Grasshopper.Kernel.GH_ActiveObject.ExpireSolution(Boolean recompute)
at Grasshopper.Kernel.GH_Component.ExpireDownStreamObjects()
at Grasshopper.Kernel.GH_ActiveObject.ExpireSolution(Boolean recompute)
at DK_http.HttpCat.HttpIn.httpHandlerOnChanged(Object sender, EventArgs e)
at DK_http.HttpHandler.onChanged()
at DK_http.HttpHandler.startListenning()
at System.Threading.Thread.StartHelper.Callback(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
[END ERROR]
It looks like you’re calling ExpireSolution() from a background thread, but instead should invoke that on the main thread (this is true on both Windows and Mac). I’m not sure if this is what you’re running into, but at least that is a start.
In general, there shouldn’t be any issues running net7.0 compiled code in .NET 9. Rhino 9 on Windows will be able to run in .NET 4.8, 8, 9, and 10 when released, whereas on Mac it will only run with .NET 9 (10 when released).
Edit: This means for Rhino 9 or later, you should target at least net48 and net8.0 to support both platforms and all runtimes. If you want to target Rhino 8 or later, then it would be net48 and net7.0.