dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9k stars 1.88k forks source link

Fix net461/netstandard2.0 incompatibility #4741

Open sharwell opened 4 years ago

sharwell commented 4 years ago

net461 isn't compatible with netstandard2.0. In the netfx build configurations, some projects target net461 and reference Microsoft.ML.Core, which only targets netstandard2.0. There are a few options:

  1. Multitarget the projects that currently target netstandard2.0 to also target net461
  2. Update the netfx build to use net46 instead of net461, and multitarget the netstandard projects to also target netstandard1.3
  3. Update the netfx build to use net472 instead of net461

We used option 2 in Roslyn 1.x and 2.x, and switched to option 3 in Roslyn 3.

harishsk commented 4 years ago

Is net472 compatible with netstandard2.0? Is there any blocker for ML.NET going to option 3 right away?

sharwell commented 4 years ago

No, net472 works fine with netstandard2.0. Roslyn switched from net46/netstandard1.3 to net472/netstandard2.0.