A little confused about cross platform yak packages

I’ve released the latest version of my package Crash. As part of the latest release I set up the project to be multi-targeted (net7.0 and net48) and cross-platform (windows and mac).

Confusion & Bugs

After releasing I’ve noticed I have a bug with dotnet core for Rhino 8 Windows (but not mac) and the way it installs confuses me a little.

  1. I get an assembly version mismatch with System.Text.Json. Rhino uses 7.0.0 and I used 7.0.3. I can easily downgrade to 7.0.0 but this wasn’t an issue in development. This issue ONLY appears when running Rhino using dotnet core.
    This happens when I try and run -JoinSharedModel

  2. When I look in the %appdata%\McNeel\Rhinoceros\packages\8.0\Crash\1.4.2-beta directory I only see a pile of dlls, I don’t see a net48 and net7.0 directory set, such as I see in the yak package when I build it. How are the two separate folders resolving correctly when smashed together?

Wishes

  1. If Plugins could use the AssemblyLoadContext as described here for dotnet core, this would resolve my issue, and would prevent other users having this issue too.
  2. It would be great if the plugin was installed with both frameworks available, not just the one chosen at install time (This may be me mis-understanding things, note point 2 above)
  3. It would be great if I could specify Rhino versions when using Yak using a command switch. When I use Rhino 7 it will use the installed Version, but Rhino 8 will default to any and I’d love to ensure users are using the latest Rhino 8 releases currently.

Reproducing Info

:technologist: Source Code (1.4.x branch)
:package: Package (1.4.2-beta)

Technology Version Info
Windows 11 (Running inside Parallels)
Rhino 8 8.5.2404 (SR5 Candiate 3)
Mac OSX 14.1.1 (23B81) on M1
Rhino 8 8.5.24047 (SR5 Candiate 3)
Windows System Info because why not

Rhino 8 SR5 2024-2-16 (Rhino 8, 8.5.24047.13001, Git hash:master @ 87905d1371b0ad4e8a0bde67d968d309ed579093)
License type: Not For Resale, build 2024-02-16
License details: Cloud Zoo

Windows 11 (10.0.22621 SR0.0) or greater (Physical RAM: 6GB)
.NET 7.0.10

Computer platform: DESKTOP

Standard graphics configuration.

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 3.3

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: Parallels and Apple
Render version: 4.1
Shading Language: 4.10
Driver Date: 12-9-2023
Driver Version: 19.2.0.54827
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 3143008 KB

Rhino plugins that do not ship with Rhino
C:\Users\clicky\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\Crash\1.4.2-beta\Crash.rhp “Crash” 1.4.0.0
C:\Users\clicky\gits\nunittestrunner\src\bin\Debug\net7.0\TestRunner.rhp “RhinoTestRunner” 1.1.0.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp “RhinoCodePlugin” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.5.24047.13001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

– cs

P.S - Please open source yak. I will happily contribute.

1 Like

@curtisw I’m going to poke you regarding the AssemblyLoadContext and net7.0 stuff :wink: