dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.45k stars 10.03k forks source link

[Suggest] Multi-targeting support for netfx #2535

Closed aspnet-hello closed 6 years ago

aspnet-hello commented 6 years ago

From @hcoona on Thursday, November 23, 2017 11:06:19 PM

I think this is a topic related to all aspnet common libraries (Microsoft.Extensions.*) but I didn't found a suitable place for it.

I want the libraries enable multi-targeting feature to decouple netfx with netstandards. There are 2 main benefits for it:

  1. Get rid of whole net standard libraries for netfx projects.
  2. Support net45 or somehow earlier version of netfx.

A pure netfx project would not like to involve whole net standard libraries for no gain. This would increase the complexity of maintaining & deploying.

We didn't use most new features in net standard 2.0, especially for the features not appears in net45. However, we dropped the support to net45 for the reason we want to target to net standard. Surely we can target to net standard. There's no reason we couldn't target to netfx also with the help of multi-targeting.

I noticed that there is a 3rd party works on it https://www.nuget.org/packages?q=NetFx.Extensions but I think it better to be provided by official.

Copied from original issue: aspnet/FileSystem#302

aspnet-hello commented 6 years ago

From @davidfowl on Thursday, November 23, 2017 11:15:28 PM

We have no plans to support cross targeting to net45 (it's not even a supported framework anymore net452 is the minimum). That 3rd party fork seems like the way to go, it even supports targeting net40 which we're never going to do.

aspnet-hello commented 6 years ago

From @hcoona on Thursday, November 23, 2017 11:19:29 PM

By saying net45, I'm not stick to it but just use net45 for an example just because the 3rd party fork supported it. I think supporting net462 is also a meanful work. (Yes I know net462 works with net standard 2.0)

aspnet-hello commented 6 years ago

From @davidfowl on Thursday, November 23, 2017 11:23:34 PM

The answer is the same though, we don't cross compile because netstandard2.0 does run everywhere we need these libraries to run. I understand the experience is less than ideal but it's being improved.

aspnet-hello commented 6 years ago

From @hcoona on Thursday, November 23, 2017 11:32:52 PM

Well, it's acceptable but not so good. I really cannot understand why because it could become better for almost no cost by merging the forked version back.

muratg commented 6 years ago

We are closing this issue because no further action is planned for this issue. If you still have any issues or questions, please log a new issue with any additional details that you have.