Skip to content

Commit 73e968e

Browse files
committed
net7.0
1 parent 34cd8ed commit 73e968e

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11-
## [0.11.0-net7] - 2025-03-15
11+
## [0.11.0] - 2025-03-15
1212
### Added
1313
- build for net7.0 too
1414

ForPublishing.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868

6969
<ItemGroup>
7070
<PackageReference Include="FSharp.Core" Version="6.0.7" /> <!-- so that dependabot does not fail, even though it is set to be excluded -->
71-
<PackageReference Include="RhinoCommon" Version="8.19.25098.10001-rc" PrivateAssets="All" ExcludeAssets="runtime" />
7271
<PackageReference Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8" PrivateAssets="All" />
7372
<PackageReference Include="Eto.Forms" Version="2.9.0" PrivateAssets="All" /> <!-- so it works on Mac too and doesn't need Mac.Mono https://discourse.mcneel.com/t/rhino-for-mac-wip-goodbye-mono-hello-net-6/131925 -->
7473

75-
<!-- <PackageReference Include="System.Drawing.Common" Version="7.0.0" ExcludeAssets="runtime" /> -->
74+
<PackageReference Include="RhinoCommon" Version="7.0.20314.3001" Condition="'$(TargetFramework)' == 'net48'" PrivateAssets="all" ExcludeAssets="runtime" /> <!--should be the same version as Rhino.Scripting and Rhino.Scripting.Extension -->
75+
<PackageReference Include="RhinoCommon" Version="8.19.25132.1001" Condition="'$(TargetFramework)' == 'net7.0'" PrivateAssets="all" ExcludeAssets="runtime" /><!--should be the same version as Rhino.Scripting and Rhino.Scripting.Extension -->
7676

7777
<!-- This is probably not working to the editing files because the way files a structured on github does not match the way the are compiled from a one big generated file.-->
7878
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,14 @@ These are implemented with 3 overloads and `Optional` and `DefaultParameterValu
156156
let obj = RhinoScriptSyntax.CoerceRhinoObject(objectId)
157157
let layerIndex =
158158
if createLayerIfMissing then
159-
UtilLayer.getOrCreateLayer(layer, UtilLayer.randomLayerColor,
160-
UtilLayer.ByParent, UtilLayer.ByParent,
161-
allowAllUnicode,collapseParents).Index
159+
UtilLayer.getOrCreateLayer(
160+
layer,
161+
UtilLayer.randomLayerColor,
162+
UtilLayer.ByParent,
163+
UtilLayer.ByParent,
164+
allowAllUnicode,
165+
collapseParents
166+
).Index
162167
else
163168
RhinoScriptSyntax.CoerceLayer(layer).Index
164169
obj.Attributes.LayerIndex <- layerIndex
@@ -184,9 +189,14 @@ These are implemented with 3 overloads and `Optional` and `DefaultParameterValu
184189
, [<OPT;DEF(false:bool)>]collapseParents:bool) : unit = //MULTISET
185190
let layerIndex =
186191
if createLayerIfMissing then
187-
UtilLayer.getOrCreateLayer(layer,
188-
UtilLayer.randomLayerColor, UtilLayer.ByParent,
189-
UtilLayer.ByParent, allowUnicode, collapseParents).Index
192+
UtilLayer.getOrCreateLayer(
193+
layer,
194+
UtilLayer.randomLayerColor,
195+
UtilLayer.ByParent,
196+
UtilLayer.ByParent,
197+
allowUnicode,
198+
collapseParents
199+
).Index
190200
else
191201
RhinoScriptSyntax.CoerceLayer(layer).Index
192202
for objectId in objectIds do
@@ -203,17 +213,7 @@ These are implemented with 3 overloads and `Optional` and `DefaultParameterValu
203213

204214
## .NET Framework or .NET Core?
205215

206-
This library is currently only targeting .NET Framework 4.8.<br>
207-
However, it should work in .NET 7.0 or higher as well as per [the offical guidelines](https://developer.rhino3d.com/guides/rhinocommon/moving-to-dotnet-7/#migrating-your-plugin)
208-
209-
But I can not be compiled for net7.0.
210-
C# allows a project with RhinoCommon to compile targeting net7, but arguably it shouldn't.
211-
F# is stricter and does not allow this. See [dotnet/fsharp#17295 (comment)](https://github.com/dotnet/fsharp/issues/17295#issuecomment-2158893769)
212-
213-
So this libary is waiting for a [RhinoCommon Nuget](https://www.nuget.org/packages/RhinoCommon/#supportedframeworks-body-tab) nuget properly targeting `net7.0`.
214-
It is actually planned but seems to be tricky because of some hacks from the past:
215-
https://mcneel.myjetbrains.com/youtrack/issue/RH-77311/Add-.NET-7-target-to-nuget-packages
216-
216+
On Rhino 8.19 or higher, you can use .NET 7.0 too.<br>
217217

218218

219219
## Build from source
@@ -224,7 +224,7 @@ dotnet build ForPublishing.fsproj
224224
```
225225

226226
This will first combine all `Scripting_*.fs` files into one file and compile it.<br>
227-
This is neede because F# type extension are not visible from C# editor tooling.
227+
This is needed because F# type extensions are not visible from C# editor tooling.
228228

229229
## Edit the source
230230
While having all 900 methods on one class in one file is needed for publishing via `ForPublishing.fsproj` <br>

0 commit comments

Comments
 (0)