[6.0] Tools: Check for unsupported OS-specific TFMs #26094
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new OS-specific TFMs introduced in .NET 6 (net6.0-android, net6.0-ios, etc.) currently aren't compatible with dotnet-ef and the PMC commands. This adds additional checking like the ones we already have for unsupported TFMs (Xamarin.Android, Xamarin.iOS, etc.) and throws a better error message.
Fixes #25938
Note, another issue (#7152) tracks making them actually work when we can.
Customer impact
Without this, customers will continue getting obscure errors about missing .deps.json files.
Regression
Yes, kind of. While the OS-specific TFMs are new to .NET 6, the experience of working with Android and iOS projects has regressed from .NET 5.
Testing
Manually verified the new experience on VS 2022 Preview 4. We have not invested in automated functional testing for dotnet-ef and the PMC commands since this made the build system overly complex and was very flakey in EF6 (but we do have some unit tests covering the parts we can).
Risk
Low. Non-OS-specific TFMs, and the Windows TFM are allowed, so only OSes new to .NET 6 are blocked.