Skip to content
Closed

Net10 #328

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
fadddd8
Configured for Rhino 9 build
eirannejad May 8, 2025
c421ad1
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 8, 2025
2835aef
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 8, 2025
c9582a0
updated tests for rhino 9
eirannejad May 8, 2025
ad67dcb
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 8, 2025
01fd039
updated change log
eirannejad May 8, 2025
ad0a2b2
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 8, 2025
904a2e3
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 8, 2025
cff7ef9
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 9, 2025
ce1627b
Upped to 9.0.1
eirannejad May 9, 2025
3448fd0
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 9, 2025
6d670ad
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 9, 2025
2a5f704
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 10, 2025
c5957a8
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 15, 2025
9557e0c
Updated build steps for rhino 9 (#300)
eirannejad May 15, 2025
2fb283a
Improved resolver
eirannejad May 16, 2025
fc275f3
Upped to 8.0.7
eirannejad May 16, 2025
e3347a1
Added more notes
eirannejad May 16, 2025
e762d8e
Merge branch 'rhino-8.x' into ein/8.x/resolver
eirannejad May 16, 2025
71010bf
Added publish step
eirannejad May 16, 2025
359c692
Merge branch 'rhino-9.x' into ein/8.x/resolver-merge-rhino-9.x
eirannejad May 16, 2025
db5a9b5
Merge pull request #303 from mcneel/ein/8.x/resolver-merge-rhino-9.x
eirannejad May 16, 2025
8deaeca
Merge rhino-9.x into ein/8.x/notes-merge-rhino-9.x
merge-down-robot[bot] May 16, 2025
6bc4822
Merge pull request #305 from mcneel/ein/8.x/notes-merge-rhino-9.x
merge-down-robot[bot] May 16, 2025
a50c7d9
Merge branch 'rhino-9.x' into ein/8.x/fixghtoken-merge-rhino-9.x
eirannejad May 17, 2025
58989e6
Merge pull request #309 from mcneel/ein/8.x/fixghtoken-merge-rhino-9.x
merge-down-robot[bot] May 17, 2025
2d50625
Merge branch 'rhino-9.x' into ein/8.x/fixactionstepname-merge-rhino-9.x
eirannejad May 17, 2025
2358353
Merge pull request #311 from mcneel/ein/8.x/fixactionstepname-merge-r…
merge-down-robot[bot] May 17, 2025
99d8cb2
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 17, 2025
1b24cfb
Added linux condition
fraguada May 21, 2025
dea8081
updating version number
fraguada May 21, 2025
a7b8dd0
Merge pull request #312 from mcneel/luis/linux
merge-down-robot[bot] May 21, 2025
004901b
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 21, 2025
a08bab5
Merge branch 'rhino-8.x' into rhino-9.x
eirannejad May 21, 2025
e8caea1
Add plugin search path
fraguada Jun 13, 2025
7479bf1
bumo version
fraguada Jun 13, 2025
d3f1ac0
Merge branch 'rhino-9.x' into luis/platform_support
fraguada Jun 13, 2025
b60f53c
Merge pull request #313 from mcneel/luis/platform_support
merge-down-robot[bot] Jun 13, 2025
0ffe230
bump version, add platform paths
fraguada Sep 10, 2025
69162b7
updated changelog
fraguada Sep 10, 2025
3d7a2d7
Merge branch 'luis/platform_support' into luis/merge-platform-support
fraguada Sep 10, 2025
efc1962
Merge pull request #315 from mcneel/luis/merge-platform-support
merge-down-robot[bot] Sep 10, 2025
a641675
currently works
fraguada Oct 21, 2025
8920dad
support two versions of RhinoAPIVersion
fraguada Dec 9, 2025
76b65df
bump version number
fraguada Dec 9, 2025
c24b89f
Merge pull request #317 from mcneel/platformsupport_oldgh
merge-down-robot[bot] Dec 9, 2025
7939727
Do not build net48 or -windows on Linux
fraguada Dec 9, 2025
ad0d1d6
Merge pull request #318 from mcneel/platformsupport_oldgh
merge-down-robot[bot] Dec 9, 2025
dc5cc92
Don't omit Microsoft.macOS on Mac anymore
cwensley Dec 12, 2025
4590183
Merge pull request #319 from mcneel/curtis/mac-dont-omit-macos
merge-down-robot[bot] Dec 12, 2025
11f4733
Update version to include macOS changes
cwensley Dec 15, 2025
1366c81
Merge pull request #320 from mcneel/curtis/bump-version
merge-down-robot[bot] Dec 15, 2025
0ee1f81
Bump dependencies to 9.0.25350.305-wip
cwensley Dec 16, 2025
7114e4c
Merge pull request #321 from mcneel/curtis/bump-version
merge-down-robot[bot] Dec 16, 2025
de3e9fc
added version number generation
fraguada Jan 13, 2026
db9da2e
changelog
fraguada Jan 13, 2026
5f87e12
do not commit version changes in action
fraguada Jan 13, 2026
5e0492c
Merge pull request #322 from mcneel/versionNumbers
merge-down-robot[bot] Jan 13, 2026
4ea3165
pass version to build step
fraguada Jan 13, 2026
b5cb06d
use PS to copy
fraguada Jan 13, 2026
2db2b25
depend on version
fraguada Jan 13, 2026
16e34b9
add path to file download
fraguada Jan 13, 2026
84569f1
leave path as is
fraguada Jan 13, 2026
72329e5
list files after dl
fraguada Jan 13, 2026
478d32d
cleanup
fraguada Jan 13, 2026
58760f5
Merge pull request #323 from mcneel/versionNumbers
merge-down-robot[bot] Jan 13, 2026
1f70f3a
Update README.md
clicky Jan 13, 2026
bd7b51a
Merge pull request #324 from mcneel/callum/9.x/update-shield-link
merge-down-robot[bot] Jan 13, 2026
1eb9c45
tag repo
fraguada Jan 13, 2026
71574c8
fixed version.sh
fraguada Jan 13, 2026
61a7230
Merge branch 'rhino-9.x' into versionNumbers
fraguada Jan 13, 2026
6db4304
Merge pull request #325 from mcneel/versionNumbers
merge-down-robot[bot] Jan 13, 2026
d2c8294
adding version time
fraguada Jan 13, 2026
fc3b57a
remove property group
fraguada Jan 13, 2026
656ace5
Merge pull request #326 from mcneel/version_time
merge-down-robot[bot] Jan 13, 2026
f75865b
build with dotnet 10
fraguada Mar 25, 2026
1d44c50
adding more helpful message
fraguada Mar 25, 2026
eec9c5a
changelog
fraguada Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 66 additions & 19 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
name: Build
name: Build & Release
on:
pull_request:
branches: [ 'rhino-8.x' ]
branches: [ 'rhino-9.x' ]
workflow_dispatch:

env:
RHINO_TOKEN: ${{ secrets.RHINO_TOKEN }}

jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version_step.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Update Version Numbers
id: version_step
run: ./src/version/version.sh

- name: Upload versioned files
uses: actions/upload-artifact@v4
with:
name: version-files
path: |
src/Directory.Build.props

build:
runs-on: windows-latest
needs: [ version ]
steps:
- name: Get token
if: (github.event_name == 'pull_request')
Expand All @@ -25,13 +50,19 @@ jobs:
with:
token: ${{ steps.my-app.outputs.token }}

- name: Install dotnet 8.0
- name: Install dotnet 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'

- name: Checkout code
uses: actions/checkout@v4

- name: Download versioned files
uses: actions/download-artifact@v4
with:
name: version-files
path: src/

- name: Build
run: dotnet build -c Release src/RhinoInside.sln
Expand All @@ -40,37 +71,53 @@ jobs:
uses: mcneel/setup-rhino3d@v2
id: setup_rhino
with:
release-version: latest
release-version: wip
email-address: ${{ secrets.EMAIL_ADDRESS }}

- name: Run Tests (net48)
shell: pwsh
working-directory: ./src
run: ./rhinoinside-tests.ps1 "C:\Program Files\Rhino 8\System" net48
run: ./rhinoinside-tests.ps1 "C:\Program Files\Rhino 9 WIP\System" net48

- name: Run Tests (net8.0-windows)
- name: Run Tests (net9.0-windows)
shell: pwsh
working-directory: ./src
run: ./rhinoinside-tests.ps1 "C:\Program Files\Rhino 8\System" net8.0-windows

- name: Install dotnet 7.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'

- name: Run Tests (net7.0-windows)
shell: pwsh
working-directory: ./src
run: ./rhinoinside-tests.ps1 "C:\Program Files\Rhino 8\System" net7.0-windows
run: ./rhinoinside-tests.ps1 "C:\Program Files\Rhino 9 WIP\System" net9.0-windows

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: rhinoinside-nupkg
path: src/build/*.nupkg

tag:
needs: [ version, build ]
runs-on: ubuntu-latest
permissions:
contents: write
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/rhino-9.x'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Tag
run: |
TAG="v${{ needs.version.outputs.version }}"

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "❌ Tag $TAG already exists"
exit 1
fi

git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"

publish:
needs: [ build ]
needs: [ build, tag ]
runs-on: ubuntu-latest
if: (github.event_name == 'workflow_dispatch')
steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,5 @@ ASALocalRun/
# Visual Studio Code settings
.vscode
.DS_Store

src/version/version.cs
40 changes: 34 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
# Change Log

## [8.0.7]
## [9.0.26013.16420]
- Added .net 10 targets

## [9.0.26013.1000]
- Added version number generation

## [9.0.10]
- Updated rhino and grasshopper dependencies to 9.0.25350.305-wip

## [9.0.9]
- Allow resolving Microsoft.macOS assembly

## [9.0.8]
- Do not build net9.0-windows or net48 framework targets on Linux

## [9.0.7]
- Support two versions of the RhinoAPIVersion to allow Linux to use the Rhino.Inside nuget package

## [9.0.6]
- Updated rhino and grasshopper dependencies to 9.0.25252.12305-wip
- Added linux rhino install path

## [9.0.5]
- Added linux plugin search path to Resolver_NetCore.cs

## [9.0.4]
- Added linux path to Resover_NetCore.cs

## [9.0.3]
- Improved Resolver (use load context api)

## [8.0.6]
## [9.0.2]
- Improved Resolver

## [8.0.5]
- Strong-named the library
## [9.0.1]
- Storng-named the library

## [8.0.4]
- Initial release for Rhino 8 on Windows (no macOS or linux yet)
## [9.0.0]
- Initial release for Rhino 9 on Windows (no macOS or linux yet)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Rhino.Inside®

[![Discourse users](https://img.shields.io/discourse/https/discourse.mcneel.com/users.svg)](https://discourse.mcneel.com/c/serengeti/inside)
[![Discourse users](https://img.shields.io/discourse/https/discourse.mcneel.com/users.svg)](https://discourse.mcneel.com/c/rhino-inside/110)

The Rhino.Inside® technology allows Rhino and Grasshopper to be embedded within other products. It may be possible to:

Expand All @@ -11,5 +11,5 @@ The Rhino.Inside® technology allows Rhino and Grasshopper to be embedded within
* Object can be natively created by Rhino or Grasshopper within the parent product.

## Examples:
- [Rhino 8 (dotnet core)](https://github.com/mcneel/rhino-developer-samples/tree/8/rhino.inside/dotnet-netcore)
- [Rhino 8](https://github.com/mcneel/rhino-developer-samples/tree/8/rhino.inside/dotnet)
- [Rhino 9 (dotnet core)](https://github.com/mcneel/rhino-developer-samples/tree/9/rhino.inside/dotnet-netcore)
- [Rhino 9](https://github.com/mcneel/rhino-developer-samples/tree/9/rhino.inside/dotnet)
29 changes: 20 additions & 9 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworks>net48;net7.0;net7.0-windows;net8.0;net8.0-windows</TargetFrameworks>
<LangVersion>10</LangVersion>
<NoWarn>NETSDK1138;NU1701;MSB3277;CA1416</NoWarn>
</PropertyGroup>

<PropertyGroup>
<RhinoInsideVersion>8.0.7</RhinoInsideVersion>
<RhinoAPIVersion>8.0.23304.9001</RhinoAPIVersion>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<CopyrightYear>2025</CopyrightYear>
<RepositoryUrl>https://github.com/mcneel/Rhino.Inside.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/mcneel/rhino.inside/tree/rhino-8.x</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/mcneel/rhino.inside/blob/rhino-8.x/CHANGELOG.md</PackageReleaseNotes>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform(windows))">
<!-- Rhino.Inside for Rhino >= 9 is gonna support only the latest netcore version supported by Rhino -->
<!-- This is to avoid conflict between dll versions Rhino is built agaist, with dlls or older dotnet runtime -->
<!-- If you absolutely need this to work, talk to curtis @ mcneel -->
<TargetFrameworks>net48;net9.0;net9.0-windows;net10.0;net10.0-windows</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.EndsWith('windows'))">
<UseWpf>true</UseWpf>
<UseWinForms>true</UseWinForms>
</PropertyGroup>

<PropertyGroup Condition="!$([MSBuild]::IsOSPlatform(windows))">
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<RhinoInsideVersion>9.0.26013.16420</RhinoInsideVersion>
<RhinoAPIVersion>9.0.25350.305-wip</RhinoAPIVersion>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<CopyrightYear>2025</CopyrightYear>
<RepositoryUrl>https://github.com/mcneel/Rhino.Inside.git</RepositoryUrl>
<PackageProjectUrl>https://github.com/mcneel/rhino.inside/tree/rhino-9.x</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/mcneel/rhino.inside/blob/rhino-9.x/CHANGELOG.md</PackageReleaseNotes>
</PropertyGroup>

</Project>
39 changes: 32 additions & 7 deletions src/RhinoInside/Resolver_NetCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ static void PrepareRhinoEnv()
{
rhinoLibraryHandle = NativeLibrary.Load(Path.Combine(RhinoSystemDirectory, "RhinoLibrary.framework/Versions/A/RhinoLibrary"));
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
rhinoLibraryHandle = NativeLibrary.Load(Path.Combine(RhinoSystemDirectory, "libRhinoLibrary.so"));
}
else
throw new RhinoInsideInitializationException($"Unsupported platform");

Expand Down Expand Up @@ -120,8 +124,21 @@ static void SetupXamarin()

static void ExecuteLoadProc(AssemblyLoadContext context)
{
int dotnetMajor = Environment.Version.Major;
TryGetAssemblyPathFromName($"dotnetstart.{dotnetMajor}", out string dotnetstartLib);
// Revert to this once dotnetstart.10.dll is available.
// int dotnetMajor = Environment.Version.Major;
// TryGetAssemblyPathFromName($"dotnetstart.{dotnetMajor}", out string dotnetstartLib);

// 2026.03.25 - Luis Fraguada
// Temp workaround to build against .net10 and find dotnetstart.9.dll until dotnetstart.10.dll is available.
// We should remove this loop and directly look for dotnetstart.10.dll once it's available.
string dotnetstartLib = null;
for (int version = Environment.Version.Major; version >= 8; --version)
{
if (TryGetAssemblyPathFromName($"dotnetstart.{version}", out dotnetstartLib))
break;
}
if (dotnetstartLib is null)
throw new RhinoInsideInitializationException($"Could not find dotnetstart dll for .NET {Environment.Version.Major} or earlier in '{RhinoSystemDirectory}'");
var assembly = context.LoadFromAssemblyPath(dotnetstartLib);
var programType = assembly?.GetType("dotnetstart.DotNetInitialization");
var method = programType?.GetMethod("Start");
Expand Down Expand Up @@ -189,10 +206,10 @@ static Assembly ManagedAssemblyResolve(AssemblyLoadContext arg1, AssemblyName as
}

// load Microsoft.macOS in the default context as xamarin initialization requires it there
if (name == "Microsoft.macOS")
{
return default;
}
// if (name == "Microsoft.macOS")
// {
// return default;
// }

if (TryGetAssemblyPathFromName(name, out var path))
{
Expand Down Expand Up @@ -255,6 +272,10 @@ static IEnumerable<string> GetSearchPaths()
yield return Path.Combine(RhinoSystemDirectory, "netcore");
yield return Path.Combine(RhinoSystemDirectory);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
yield return Path.Combine(RhinoSystemDirectory);
}

foreach (var path in GetPluginSearchPaths())
{
Expand All @@ -277,12 +298,16 @@ static IEnumerable<string> GetPluginSearchPaths()
const string MANAGED_PLUGINS = "RhCore.framework/Versions/A/Resources/ManagedPlugIns";
yield return Path.Combine(RhinoSystemDirectory, MANAGED_PLUGINS);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
const string PLUGINS = "Plug-ins";
yield return Path.Combine(RhinoSystemDirectory, PLUGINS);
yield return Path.Combine(Path.GetDirectoryName(RhinoSystemDirectory), PLUGINS);
}
else
{
throw new RhinoInsideInitializationException($"Unsupported platform");
}
}
}
}
5 changes: 5 additions & 0 deletions src/RhinoInside/RhinoFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ public static string FindRhinoSystemDirectory(bool useLatest = false)
}
}

else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
return "/usr/lib/rhino3d";
}

throw new RhinoInsideInitializationException("Can not find Rhino >=8 installation");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/RhinoInside/RhinoInside.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
</Choose>

<Target Name="CopyPackage" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="..\build" />
<Copy SourceFiles="$(OutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="..\build" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/rhinoinside-tests-netcore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export DYLD_LIBRARY_PATH=$RHINOINSIDE_RHINOPATH/Contents/Frameworks
echo "DYLD_LIBRARY_PATH = "$DYLD_LIBRARY_PATH
echo "RHINOINSIDE_RHINOPATH = "$RHINOINSIDE_RHINOPATH
dotnet clean RhinoInside.sln
dotnet test RhinoInside.sln /tl:off -v:normal --framework net7.0 -e RHINOINSIDE_RHINOPATH=$1
dotnet test RhinoInside.sln /tl:off -v:normal --framework net9.0 -e RHINOINSIDE_RHINOPATH=$1
export -n DYLD_LIBRARY_PATH
export -n RHINOINSIDE_RHINOPATH
Loading
Loading