gustavnavar / Grid.Blazor

Grid component with CRUD for Blazor (client-side and server-side) and ASP.NET Core MVC
GNU Lesser General Public License v2.1
696 stars 134 forks source link

Net 8 Support #412

Closed peterM closed 4 months ago

peterM commented 4 months ago

Please add support for .Net 8 Currently when i just change project to .net 8 i am getting:

blazor.server.js:1 [2024-04-19T18:38:00.618Z] Error: System.InvalidOperationException: Querystring values cannot be parsed as type '<MyTableType>'.
   at Microsoft.AspNetCore.Components.Routing.QueryParameterValueSupplier.GetQueryParameterValue(Type targetType, String queryParameterName)
   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)
blazor.server.js:1 [2024-04-19T18:38:00.620Z] Information: Connection disconnected.
2
blazor.server.js:1 Uncaught Error: No interop methods are registered for renderer 1
    at T (blazor.server.js:1:13936)
    at blazor.server.js:1:13842
    at D (blazor.server.js:1:14025)
    at k (blazor.server.js:1:13816)
    at P.dispatchGlobalEventToAllElements (blazor.server.js:1:16418)
    at P.onGlobalEvent (blazor.server.js:1:15611)
gustavnavar commented 4 months ago

.Net 8 is already supported since version 5.0.0

Could you share your code in order to debug it?

peterM commented 4 months ago

Unortunatelly not. I can't provide code. All I could send is log from console even VS does not throw any exception. Problem happens in all inherited components.

@inherits GridReadComponent<AllMyTypes>
@inherits GridUpdateComponent<AllMyTypes>
@inherits GridDeleteComponent<AllMyTypes>

Create is loaded ok but i did not tried if it is working without issues because if upper classess does not work i can not upgrade at all.

@inherits GridCreateComponent<AllMyTypes>

Its weird it is doing only when project is migrated to .NET 8 Could you provide debug symbols in your packages ?

Thanks

gustavnavar commented 4 months ago

You can download the source code of this project and use references to Gridblazor and Gridshared directories instead of using the nuget package in order to debug your code.

gustavnavar commented 4 months ago

I've published new releases including debug symbols.

peterM commented 4 months ago

Thank you. Unfortunatelly I do not see any symbol in nuget packages.


EDIT: I downloaded your code, but no breakpoint is triggered it looks like its some .Net 8 defect ... argh ..

peterM commented 4 months ago

Ok so it was purely my fault... I think I solved it...

Problem was caused by [SupplyParameterFromQueryAttribute]

Looks like there is different [SupplyParameterFromQuery(Name = "...")] handling behaviour between .NET 7 and .NET 8 I had these attributes in components.

gustavnavar commented 4 months ago

You can manually download symbol files from nuget.org:

Or you can configure Visual Studio to download them from NuGet symbol server: https://github.com/NuGet/Home/wiki/NuGet-Package-Debugging-&-Symbols-Improvements

peterM commented 4 months ago

Thank you .. problem was on my side i think you can close it here.