Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful message after upgrading 8.0 app to 9.0 #21204

Open
vitek-karas opened this issue Sep 9, 2024 · 1 comment
Open

Unhelpful message after upgrading 8.0 app to 9.0 #21204

vitek-karas opened this issue Sep 9, 2024 · 1 comment
Labels
enhancement The issue or pull request is an enhancement
Milestone

Comments

@vitek-karas
Copy link

Apple platform

Mac Catalyst

Framework version

net9.0-*

Affected platform version

9.0.100-preview.7.24407.12

Description

Upgrading an 8.0 MAUI app to 9.0 by changing TFMs to net9.0 and then trying to run it as maccatalyst produces a confusing error and suggest a fix which is at best misleading.

(The repro steps will produce the below error)

    ILLink : unknown error IL7000: An error occured while executing the custom linker steps. Please review the build log for more information.
    ILLINK : error MT0073: Microsoft.MacCatalyst 17.5.9231 does not support a deployment target of 13.1 for MacCatalyst (the minimum is 15.0). Please select a newer deployment target in your project's Info.plist.
    ILLINK : error MT2301: The linker step 'Setup' failed during processing: Microsoft.MacCatalyst 17.5.9231 does not support a deployment target of 13.1 for MacCatalyst (the minimum is 15.0). Please select a newer deployment target in your project's Info.plist.

Several problems with this:

  • ILLink - normal users should not need to know what this is and it's just confusing. Additionally this doesn't feel like the right place to report this kind of problem. Ideally this should be done by the SDK earlier on, the linker custom step doesn't necessarily have enough context to produce a helpful error message.
  • The errors are not documented - or at least not findable. Searching bing for MT0073 doesn't produce anything useful. Same goes for IL7000. Ideally we should include a URL which points to more details about the problem.
  • The suggested fix is to update Info.plist - this file does exist in a MAUI template app, but it doesn't contain the version number - just variable references. Changing it is very likely not the correct fix. The correct place to fix in this case seems to be to modify the .csproj which defines SupportedOSPlatformVersion. It is possible that this correct fix depends on the project type (MAUI versus just iOS and so on), but at least MAUI is probably the majority of users and thus should be included.
  • Nit occured word in the IL7000 message is misspelled - should be occurred.

Steps to Reproduce

On .NET 8 SDK - dotnet new maui
Open the .csproj and update all TFMs to net9.0.
Using .NET 9 SDK - dotnet build /t:Run -f net9.0-maccatalyst

Did you find any workaround?

No response

Relevant log output

No response

@rolfbjarne
Copy link
Member

ILLink - normal users should not need to know what this is and it's just confusing. Additionally this doesn't feel like the right place to report this kind of problem. Ideally this should be done by the SDK earlier on, the linker custom step doesn't necessarily have enough context to produce a helpful error message.

Agreed we can report this particular error sooner.

This should be fixed once #17693 is done.

  • The errors are not documented - or at least not findable. Searching bing for MT0073 doesn't produce anything useful.

The documentation got more or less scrubbed from the internet when Xamarin docs were scrubbed :(

Here's the relevant documentation: https://learn.microsoft.com/vi-vn/previous-versions/xamarin/ios/troubleshooting/mtouch-errors#mt0073-xamarinios--does-not-support-a-deployment-target-of--the-minimum-is--please-select-a-newer-deployment-target-in-your-projects-infoplist

We're working on getting docs updated and published again for .NET, but this will take a while.

  • Ideally we should include a URL which points to more details about the problem.

Agreed, I've filed #21218 to keep track of this.

The suggested fix is to update Info.plist - this file does exist in a MAUI template app, but it doesn't contain the version number - just variable references. Changing it is very likely not the correct fix. The correct place to fix in this case seems to be to modify the .csproj which defines SupportedOSPlatformVersion. It is possible that this correct fix depends on the project type (MAUI versus just iOS and so on), but at least MAUI is probably the majority of users and thus should be included.

I've opened #21211 to improve the error message.

  • Nit occured word in the IL7000 message is misspelled - should be occurred.

Thanks, will be fixed in #21208.

@rolfbjarne rolfbjarne added the enhancement The issue or pull request is an enhancement label Sep 11, 2024
@rolfbjarne rolfbjarne added this to the Future milestone Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue or pull request is an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants