Comments (4)
RhinoCommon is transitioning from the .Net Framework to .Net Core
You say that, but it still only supports net48
.
This works fine in C#
It compiles, but I'm willing to bet that you'll get a run-time exception if you try to do anything. System.Drawing.Bitmap
appears to live in a different assembly on new versions of .NET.
Compilation error is the more reasonable outcome here in my opinion. If anything, C# is being too liberal in what it compiles. I know that oftentimes an old Framework library will just work, but the following warning is displayed for a reason
CsPlugin.csproj : warning NU1701: Package 'RhinoCommon 8.7.24138.15431' was restored using '.NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
I wouldn't be surprised if the F#'s [team's] policy was to simply consider this an unsupported scenario.
from fsharp.
It compiles, but I'm willing to bet that you'll get a run-time exception if you try to do anything.
System.Drawing.Bitmap
appears to live in a different assembly on new versions of .NET.
I get that it looks weird, I don't know how or why they are doing this, but people are using this package to create cross-platform Win/Mac plugins on .Net Core with C#. It's only F# that can't compile.
https://developer.rhino3d.com/guides/rhinocommon/moving-to-dotnet-7/
from fsharp.
@EricM81 -
The coreclr does not support desktop framework assemblies. As soon as you do significant work you will encounter missingmethod exceptions and typeload errors.
The runtime has some libraries for winforms workloads that run on the coreclr, you should port your baselibrary to that framework first. We haven't done any real work to ensure they are supported either, we are rather few developers, however we will certainly try to work with you to ensure that F# works well in that scenario moving forward.
BTW:
the error failing your compile was not caused by but because F# doesn't allow you to assign null to bindings holding F# types by default. C# code allows the assignment of null to variables that are typed as reference types.
c:\kevinransom\RhinoCommonFsBug\FsPlugin\PluginInfo.fs(12,21): error FS0001: The type 'MyPlugin' does not have 'null' as a proper value. See also c:\kevinransom\RhinoCommonFsBug\FsPlugin\PluginInfo.fs(9,34)-(9,38).
CsPlugin succeeded with 2 warning(s) (1.9s) → CsPlugin\bin\Debug\net7.0\CsPlugin.dll
Kevin
from fsharp.
Closing this as "by design".
from fsharp.
Related Issues (20)
- compressMetadata switch in fsc build task needs to be made optional
- Can't reference static member in an interface, from another static member HOT 2
- VS: option pages erroring. HOT 9
- `TailCall` attribute incorrectly warning HOT 2
- C# interface can't be implemented on F# HOT 10
- Degraded IL codegen with .NET 9 preview 7 HOT 1
- `unit` elimination logic can lead to unutterable & unimplementable signatures HOT 1
- `open type T` when `T` is an enum is treated as unused even when it's used HOT 1
- [Automated] PRs inserted in VS build feature.debugger.shadowDebug-35227.190
- [Automated] PRs inserted in VS build main-35228.30
- `open type T` treated as unused when unqualified extension member on `T` used HOT 1
- `open type` does not bring enum cases into scope in patterns HOT 2
- [Automated] PRs inserted in VS build feature.debugger.main-35228.301
- Tooltip suggestion - show "allow ref struct" for typars of external types and methods
- Investigate why `IsMethod` and `IsProperty` don't act as expected for generated methods/properties
- No intellisense error or meaningful errormessage on Seq.iter build error. HOT 2
- Tests are broken in main in FSharp.Compiler.Service solution HOT 4
- Nullness issue - tooling - turning on <Nullable>enable</> removes detailed API descriptions in tooltips
- Ability to dump current interactive session to a file HOT 3
- Revert workaround - https://github.com/dotnet/fsharp/pull/15982 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.