dotnet / arcade

Tools that provide common build infrastructure for multiple .NET Foundation projects.
MIT License
667 stars 345 forks source link

Formalize Known*Pack and Known*Reference support in Arcade #15121

Open mmitche opened 1 day ago

mmitche commented 1 day ago

Repositories in the core stack of .NET either get their runtime packs, targeting packs, crossgen tooling, etc. from the SDK, or from an incoming runtime build. In some cases, it may be a bit of a hybrid. For instance, windowsdesktop might get its targeting pack from the incoming runtime, but the crossgen tooling from the SDK. To achieve this, repositories use KnownFrameworkReference and other items to update or add the version of the pack to the SDK's known list.

The problem is that use of these properties is relatively inconsistent across the stack, and when it comes time to update to a new TFM where an SDK for that TFM does not yet exist, things get awkward. Teams often have to put in temporary workarounds:

I think that arcade should provide this functionality to repos in the core stack. The shape of this functionality should be:

Unified Build makes this functionality more important because the TFM update tends to need to be done simultaneously across the core shared framework repos.

lewing commented 1 day ago

For example https://github.com/dotnet/aspnetcore/blob/fe0fbff040c9f129ba3f5ee8cf15c8f6d96fb50e/eng/tools/GenerateFiles/Directory.Build.targets.in#L12-L120