Skip to content

Add NetCoreAppCurrent configurations to every library that targets .NETStandard or .NETCoreApp #54012

Closed
@ViktorHofer

Description

@ViktorHofer

With the evolution of .NET (net5.0 and above), building .NETCoreApp libraries becomes more important as they benefit from features like linking, compiler optimizations and the platform analyzer which is not enabled in dotnet/runtime for .NETStandard and .NETFramework tfms. To go even further, nullability warnings are more mature when targeting the very latest .NETCoreApp configuration and newer APIs become available to target which are often more efficient or easier to read. An example of such an API is the string.Contains usage over string.IndexOf which .NET even warns about now. Last but not least this avoid the need to reference the netstandard shim which means we don't cross assembly universes.

I propose to add a NetCoreAppCurrent configuration to any library that doesn't have one and targets .NETStandard or .NETCoreApp. Please note that this won't increase the overall build times as by default, only the best applicable tfm is built per project in a traversal build. That said, when building an individual library, build times will increase slightly as filtering doesn't happen there.

@marek-safar and @eerhardt especially expressed their interest in this.

Here's the list of the 49 libraries which don't have a NetCoreAppCurrent (and neither any .NETCoreApp) configuration:

cc @ericstj @Anipik @safern @stephentoub @jkotas

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions