fgilde / MudBlazor.Extensions

MudBlazor.Extensions from https://www.mudex.org is a small extension for MudBlazor from https://mudblazor.com
http://www.mudex.org
MIT License
245 stars 20 forks source link

[Bug]: MudExDialogService does not implement new #98

Closed jaypalexa closed 4 months ago

jaypalexa commented 4 months ago

Contact Details

No response

What happened?

Florian -- I know you are on vacation until August 20th, and I do not expect a resolution before then, of course. I just wanted to get this documented before I forgot about it.


The following exception is thrown on startup in Program.cs when executing builder.Services.AddMudExtensions();:

System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types.
Method 'add_DialogInstanceAddedAsync' in type 'MudBlazor.Extensions.Services.MudExDialogService' from assembly 'MudBlazor.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'

image


It looks as though MudBlazor v.7.2.0 possibly introduced a breaking change by adding a new DialogInstanceAddedAsync event to the IDialogService interface:

image


refs: https://github.com/MudBlazor/MudBlazor/pull/9306

Expected Behavior

No exception on startup

Screenshots

No response

Reproduction link

No response

What application type are you referring to?

WebAssembly

Custom Application Type

No response

MudBlazor.Extension Version

2.0.0

MudBlazor Version

7.2.0

What .net Version are you using?

.Net8

What browser are you using?

Chrome

Sample Solution

No response

Pull Request

No response

Code of Conduct

fgilde commented 4 months ago

Thanks for reporting. And I'm really sorry that my vacation is until start of mud 7. all open bugs are very easy to fix but currently I can't do it. Maybe next week we have a stop with a better house and internet, maybe I can fix it then. However thank you for reporting.

ScarletKuro commented 4 months ago

I'm really sorry for this breaking change. I should have provided a default implementation since C# now allows it for interfaces for this exact reason.

jaypalexa commented 4 months ago

I'm really sorry for this breaking change. I should have provided a default implementation since C# now allows it for interfaces for this exact reason.

@ScarletKuro Oooh...that's an interesting and good idea. Any chance of tweaking that for the next MudBlazor release?

fgilde commented 4 months ago

So I used the mac book from my wife and created a fix.

Its fixed in 2.0.2 https://www.nuget.org/packages/MudBlazor.Extensions/2.0.2

jaypalexa commented 4 months ago

All working for me here now, many thanks. You have gone above and beyond. Enjoy your vacation!