-
Notifications
You must be signed in to change notification settings - Fork 421
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
[BUG] Could not set up parent class, due to: Invalid generic instantiation #1075
Comments
Do you get an error when using .NET MAUI v7.0.59? CommunityToolkit.Maui v5.0.0 only supports .NET MAUI v7.0.59. See the release notes for more details: https://github.com/CommunityToolkit/Maui/releases/tag/5.0.0 |
Thanks @brminnick, my bad. Updated my desktop but not mac. .NET MAUI v7.0.59 works. |
Thanks for following up! |
I think the issue is present again. |
Thanks @marcojak for sharing feedback. The issue is in fact present again. I'm unsure the root cause, it will require further investigation. I also ran some tests today and I faced the same issue after updating to 9.0.3. As a quick workaround: |
Same here. CommunityToolkit.Maui version 9.1.0 does not work on physical iPhone devices. I crashes at app startup.
|
Same issue as @thomasgalliker with Toolkit 9.1.0 when trying to run MacCatalyst target. Going back to 9.0.3 and cleaning is okay. |
Why are we seeing this? Is there something that is being built and causing a dependency on later versions of MAUI or workloads? |
Current listed version on dotnet 8.x downloads site shows 8.0.402 as current SDK release. It is possible that the |
It's most likely a problem with the Trimmer and/or the Linker. You can disable Trimming by setting this value in the CSPROJ: <PublishTrimmed>true</PublishTrimmed> You can disable the Linker by following these docs: https://learn.microsoft.com/en-us/dotnet/maui/ios/linking?view=net-maui-8.0 |
Also happens with MediaElement 4.1.1. Reverting to 4.1.0 fixes the issue |
Same. I do not get the error is I downgrade 9.0.3. System.TypeLoadException: Could not set up parent class, due to: Field 'k__BackingField' is an invalid generic instantiation of type System.Func |
@brminnick I wanted to test this suggestion, so I added false to the csproj. Since I am seeing this issue building the debug configuration, I was assuming that linking/trimming was already disabled but though well maybe... But after adding the setting I got this in the build output:
So...I tried doing what the message says to do instead. It built, but that didn't seem to help with the reported issue. |
@DennisWelu enwe are working on a fix here: #2243 |
Hey gang! I'm closing this issue because it has since spawned into folks hitting multiple different Issues, assuming it is the same problem Kieren identified in his initial issue. @KieranMaclagan confirmed his specific Issue was fixed by installing the latest version of .NET MAUI. Please open a new Issue for the other problems reported in this thread. |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
Attempting to debug on a physical iOS device from crashes on startup with System.TypeLoadException Could not set up parent class, due to: Invalid generic instantiation.
Expected Behavior
App does not crash on start up.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/KieranMaclagan/MCTAppBuilderExtensionsTest
Environment
Anything else?
CommunityToolkit.Maui 4.0.0 does experience this
CommunityToolkit.Maui 3.1.0 does not experience this
Stack Trace:
The text was updated successfully, but these errors were encountered: