dotnet / dotnet/source-build

Add target that validates that every packable project contains a $(NetCurrent) target framework

Open
#3,350 1 comment 1 reaction 0 assignees View on GitHub
area-build
Dominant language
No language data
Stars
287
Forks
145
Avg merge
1d 22h
Merged PRs (30d)
10

Description

_`$(NetCurrent)` refers to the TFM of the major release of .NET that the Arcade SDK and the toolset SDK aligns with._

Source building .NET is about generating assets for the current version of the product. At the time of writing this refers to .NET 8 and the net8.0 TFM. While the source-build team is actively working on removing .NET Framework nodes from the build and pre-build graph, .NET Standard and out-of-support .NETCoreApp versions are still dependent on.

We should consider adding a validation target into Arcade that verifies that every packable project targets at least `$(NetCurrent)`.

The reasons for doing so contribute to source build's sustainability:
1. Reduces size significantly by avoiding .NETStandard targeting packs altogether, and .NETCoreApp targeting packs for out-of-support runtimes.
2. Eliminates SBRP prebuilds when the package in question is still live produced in the build graph.
3. Makes it easier to rev to the next major version of .NET by avoiding new prebuilds
4. Faster source builds because of less nodes in the build graph.

While some repositories like dotnet/runtime already offer `$(NetCurrent)` assets for all packages that are part of source-build, not every repository does that. We could manually roll that enforcement out and while doing that also making sure that the floating TFM property is used `$(NetCurrent)` so that repositories automatically rev their assets to the next major version of .NET.

cc @MichaelSimons @mmitche @ericstj

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.