-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
.NET 9 Blazor WebAssembly: Rendering exception due to recursive type definition #109931
Comments
This problem has stopped our .NET 8 -> 9 migration. |
@javiercn Could you or your team please take a look at this? This is blocking a large migration effort we have in progress. Thanks. Or even some sort of workaround would be good... |
I have posted a temporary fix in the smartenum repository. The issue is the declaration of the array
I changed it to the below and it now works. Something odd there.
|
@soenneker thanks for contacting us. Does this happen during development or does it happen after you publish? |
@javiercn thanks for getting back. This happens during development (debug etc), and not only when published. |
@javiercn Same for me. I can confirm that this issue exists with both local debugging and published applications (as tested with a solution being published to a Docker image using mcr.microsoft.com/dotnet/aspnet:9.0 as base). |
@slowfight @soenneker thanks for the additional details. This seems like a runtime issue, as this worked in 8.0. I can't think of a reason why we would be able to cause a BadImage exception. |
Tagging subscribers to 'arch-wasm': @lewing |
Probably related to mono/mono#15760 cc @BrzVlad |
Not convinced they are related. This reproduces on desktop and I confirm it is a runtime regression from net8. |
Regression caused by e5f0c36 |
Is there an existing issue for this?
Describe the bug
Upgrading my .NET 8 Blazor WebAssembly application to .NET 9 lead to frontend rendering issues. In my specific case, I'm using a type derived from Ardalis.SmartEnum to display certain information. The SmartEnum class by Ardalis uses a recursive type where it references the derived class itself as a type parameter.
The result of this behavior is a completely defective rendering of the respective page. The console states the following error:
Expected Behavior
Rendering of the page succeeds as with .NET 8.
Steps To Reproduce
Home.razor
example pageExceptions (if any)
System.BadImageFormatException
.NET Version
9.0
Anything else?
Issue at Ardalis.SmartEnum: ardalis/SmartEnum#556
The text was updated successfully, but these errors were encountered: