Closed nadavhury closed 5 months ago
Hi, I ran into the exact same issue, i temporarily solved by using this snippet which basically does the same thing: https://try.mudblazor.com/snippet/QYGcvPGRKNnbVkiE
Thank you for taking the time to address this, I wanted to have the entire component features, so I copied the entire component razor and razor.cs to a new component inside my project and it worked ok, No other changes needed.
Yeah that is basically, what I did as well, glad it worked out for you too!
Do you have idea why it doesn't work? Is ButtonTemplate a new thing?
The error was: Unable to cast object of type 'Microsoft.AspNetCore.Components.RenderFragment
1[System.String]' to type 'Microsoft.AspNetCore.Components.RenderFragment
1[MudBlazor.FileUploadButtonTemplateContext`1[Microsoft.AspNetCore.Components.Forms.IBrowserFile]]'
I assume the problem is in the upload button for the csv
I've got the same issue in WASM project. It seems an incompatibility with .net8. On .net7, csvmapper component works like a charm.
New version (6.8.0) released and it natively supports .NET 8 could you try it again?
New version (6.8.0) released and it natively supports .NET 8 could you try it again?
I checked on the .net 8, 6.8.0 version and all is working ok.
I'm getting a similar issue as far as I can tell, in .net 8.0.204, I get an Unhandled Promise Rejection: Error: System.ArgumentNullException: ArgumentNull_Generic Arg_ParamName_Name, obj at System.ArgumentNullException.Throw(String paramName) at System.Reflection.CustomAttribute.GetCustomAttributes...
... At the moment that I drop the file to be processed.
FYI: CsvHelper: 31.0.3, extensions: 69.2
However, if I copy the component into my code and reference that, all is well.
Hi,
this is my code: `
`
And I get this error When the Dialog try to come up:
Error: System.InvalidOperationException: Unable to set property 'ButtonTemplate' on object of type 'MudBlazor.MudFileUploadg__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
1[[Microsoft.AspNetCore.Components.Forms.IBrowserFile, Microsoft.AspNetCore.Components.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]'. The error was: Unable to cast object of type 'Microsoft.AspNetCore.Components.RenderFragment
1[System.String]' to type 'Microsoft.AspNetCore.Components.RenderFragment1[MudBlazor.FileUploadButtonTemplateContext
1[Microsoft.AspNetCore.Components.Forms.IBrowserFile]]'. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Components.RenderFragment1[System.String]' to type 'Microsoft.AspNetCore.Components.RenderFragment
1[MudBlazor.FileUploadButtonTemplateContext1[Microsoft.AspNetCore.Components.Forms.IBrowserFile]]'. at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TTarget,TValue](Action
2 setter, Object target, Object value) at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.Any Ideas on why that might happen?
Thanks, Nadav.