Skip to content
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

Upgrade to NET5 #28

Closed
arivera12 opened this issue Jan 29, 2021 · 6 comments
Closed

Upgrade to NET5 #28

arivera12 opened this issue Jan 29, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@arivera12
Copy link
Owner

https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-5.0&tabs=visual-studio

@arivera12 arivera12 self-assigned this Jan 29, 2021
@arivera12 arivera12 added the enhancement New feature or request label Jan 29, 2021
@arivera12
Copy link
Owner Author

arivera12 commented Jan 29, 2021

This upgrade may help fix and improve this issues but this may require to upgrade to NET5, it seems worth for blazor wasm to increase download speed in a exponential way.

@surgicalcoder
Copy link

This is now a breaking change in .net 6.0 - https://docs.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/6.0/byte-array-interop

You get the following error:

Error: Microsoft.JSInterop.JSException: sBase64.replace is not a function
TypeError: sBase64.replace is not a function
    at base64DecToArr (eval at <anonymous> (https://localhost:6001/_framework/blazor.server.js:1:3466), <anonymous>:31:27)
    at BlazorDownloadFile (eval at <anonymous> (https://localhost:6001/_framework/blazor.server.js:1:3466), <anonymous>:3:18)
    at https://localhost:6001/_framework/blazor.server.js:1:3466
    at new Promise (<anonymous>)
    at Ct.beginInvokeJSFromDotNet (https://localhost:6001/_framework/blazor.server.js:1:3440)
    at https://localhost:6001/_framework/blazor.server.js:1:70741
    at Array.forEach (<anonymous>)
    at Ct._invokeClientMethod (https://localhost:6001/_framework/blazor.server.js:1:70727)
    at Ct._processIncomingData (https://localhost:6001/_framework/blazor.server.js:1:68769)
    at yt.Ct.connection.onreceive (https://localhost:6001/_framework/blazor.server.js:1:63169)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)

@arivera12
Copy link
Owner Author

I will try take a look how to upgrade this with backward compatibility.

@TanayParikh
Copy link

TanayParikh commented Oct 20, 2021

Hello @arivera12, I'd recommend skipping .NET 5 and going straight to .NET 6 in this case as .NET 6 has significant improvements to the byte array interop mechanisms.

Blazor no longer Base64 encodes/decodes byte[], and also natively supports streaming via JSStreamReference/DotNetStreamReference. This'll provide SIGNIFICANT improvements to stability and performance over .NET 5 in this area.

Links:

@arivera12
Copy link
Owner Author

@TanayParikh yes this is a huge performance boost.

I see people having issues at this moment with net5 and net6.

I will try separate a space on the weekend to upgrade this with backward compatibility

@arivera12
Copy link
Owner Author

Please download latest version 2.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants