BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Hi all,
With the recent Net 9 update coming out, we upgraded our project to the newest version of Net 9 and are having issues using Syncfusion and the new constructor injection for Blazor code-behind files.
Net 9 brought in the new feature of using constructor injection in Razor code-behind files as noted here in Microsoft's documentation.
I am attaching two projects, one with a default Net 9 project but with an added constructor injection Razor code-behind file (Home.razor.cs) and the same project with Syncfusion added using the SfDialogService (same file). The first project shows that constructor injection works and the second shows the error you get when you add the Syncfusion package and try to use constructor injection.
Also attached is the unhandled error that I get in the console after adding Syncfusion and trying constructor injection. The error deals with a parameterless constructor but as seen in the first project, it is not needed anymore with Net 9, leading me to believe there are some incompatibilities with Net 9 constructor injection and Syncfusion.
Is this something that you are all already aware of and fixing? Is there any workarounds that you know of?
Thank you,
Ignacio Amezcua
Hi Ignacio Amezcua,
We have resolved the issue and provided a custom patch with the changes below. However, we still need to validate further as the modifications were made at the initial step of initialization of our component. If any additional changes are required, we will share them with you. Otherwise, we will perform complete testing and include this fix in our upcoming volume release. In the meantime, you can use this custom patch. If you face any issues, please let us know.
Custom Patch Link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/CustomPatch-1418783069
Additionally, we have logged the bug feedback for better follow-up. You can comment in that if you have any concerns/queries.
Feedback link : https://www.syncfusion.com/feedback/64153/need-to-provide-a-constructor-based-dependency-injection-support-while-using
Regards,
Arun Kumar R
Thank you so much for sharing the link.
Hi Elias York,
Thank you for the update. The fix will be included in the upcoming 2025 Volume 1 release, which is scheduled for the third week of March.
Regards,
Arun Kumar R
Hi Ignacio Amezcua,
Thanks for your patience. We have resolved the 'Constructor based dependency injection when using NET 9' issue in our 2025 Volume 1 Main Release (v29.1.33).
Release notes: https://blazor.syncfusion.com/documentation/release-notes/29.1.33?type=all#breaking-changes
The problem occurred due to changes in .NET 9’s dependency injection mechanism, which affected the way builder.Services.AddSyncfusionBlazor()
registered services.
Also, we are glad to announce that our Essential Studio® 2025 Volume 1 Main Release v29.1.33 is rolled out and is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Arun Kumar R