-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting netstandard2.x platform specific target frameworks is causing unreasonable pain #64536
Comments
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsThe toolchain (mostly NuGet) supports platform specific target frameworks since net5.0 but .NETStandard specific platform target frameworks never were and likely never will be supported (we asked the NuGet team and they refused because of technical limitations). During the migration from the old configuration system (which was Nowadays, the only platform specific target frameworks still in use in our libraries are
As .NETStandard will continue to be supported by libraries in dotnet/runtime for many years (just my own guess - nothing official), I would like to propose removing the The reason why I feel strongly about removing
Alternatives like runtime checks which don't rely on platform specific
|
I support a change here. @ViktorHofer -- the package/library lifecycle work you kicked off in 6.0 set the stage for this. That is not to say we can drop |
Remove the remaining ten .NETStandard runtime specific implementations. For reasoning please see dotnet#64536.
* Remove .NETStandard runtime implementations Remove the remaining ten .NETStandard runtime specific implementations. For reasoning please see #64536. * Remove infra support for NS platform specific tfms Also cleaning-up some logic and stop disabling AppendTargetFramework.
The toolchain (mostly NuGet) supports platform specific target frameworks since net5.0 but .NETStandard specific platform target frameworks never were and likely never will be supported (we asked the NuGet team and they refused because of technical limitations). During the migration from the old configuration system (which was
TargetGroup
based) to the Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk package (TargetFrameworks
based) we had to trick NuGet to not see target framework platform overloads so that the toolchain doesn't raise errors. At that time, netstandard2.x wasn't the only tfm with a platform overload, others werenetcoreapp2.x-
,netcoreapp3.x-
,netstandard1.x-
,net46x-
. We had to apply the mentioned trick (or better to say, hack) on every target framework in theTargetFrameworks
property.Nowadays, the only by the toolchain unsupported platform specific target frameworks still in use in our libraries are
netstandard2.0
andnetstandard2.1
. The following libraries still make use of them:netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0-Unix;netstandard2.0
netstandard2.1-windows;netstandard2.1;netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0
netstandard2.1-windows;netstandard2.1;netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0
netstandard2.0-windows;netstandard2.0
As .NETStandard will continue to be supported by libraries in dotnet/runtime for many years (just my own guess - nothing official), I would like to propose removing the
netstandard2.x
platform specific target frameworks, which aren't supported by the toolchain, from the above list.The reason why I feel strongly about removing
netstandard2.x
platform specific target frameworks is because of the following inconveniences that exist because of the hack to satisfy the toolchain:runtime/src/libraries/System.DirectoryServices.AccountManagement/NuGet.config
Line 2 in 215c328
That hack is only supported by static graph restore. A normal/legacy restore without static graph will blow up. Besides, any external component which isn't considered by the hack won't be able to interpret the overloaded target frameworks either. In general, the number of issues that have been opened because of IDEs not being able to interpret the overloaded target frameworks, strongly indicate unreasonable pain.
AppendTargetFrameworkToOutputPath
feature which is on by default had to be disabled and instead,OutputPath
andIntermediateOutputPath
had to be set manually to honor the stripped "suffix".TargetFrameworkSuffix
to form conditions that should only apply to either the platform specific or the platform agnostic netstandard2.x tfm whenever both are present. This makes the already complex item conditions in our libraries even harder to read and write.Alternatives like runtime checks which don't rely on platform specific
netstandard2.x
target frameworks should be explored, especially because of the number of projects that still use them is very low.@ericstj @safern
The text was updated successfully, but these errors were encountered: