dotnet / dotnet/sdk

Don't try to build TFMs that we know we can't build

Open
#41,639 0 comments 0 reactions 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK Area-Workloads untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is your feature request related to a problem? Please describe.

There are certain platforms that we are pretty sure will never be able to be built on other platforms - for example, building Windows TFM applications using MAUI on non-Windows platforms is not supported, so the MAUI templates include a condition to filter the Windows TFM out if building on a non-Windows host: https://github.com/dotnet/maui/blob/4fabb3eb2eef4a1c81664f9696e25c1cd434ae93/src/Templates/src/templates/maui-mobile/MauiApp.1.csproj#L5.

There are other parallels too - building for macOS is often not possible on non-macOS systems due to licensing or a reliance on macOS tools.

We should be able to ensure that a project never builds for a TFM that we are pretty sure will not be able to be built successfully on the host platform. This should be seamless and not require the kinds of conditions in end-user code that the above MAUI sample had to add.

Big questions:
* do we know what all of the combinations of works/doesn't work are?
* can we know this early enough in the build to influence multitargeting?

cc @marcpopMSFT @Redth @davidortinau

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.