GithubHelp home page GithubHelp logo

Comments (6)

Hoshani avatar Hoshani commented on May 23, 2024 2

googling this issue landed me here, to whomever lands here in the future: I had to simply install System.Text.Json nuget package to solve the issue.

from localstorage.

tripleacoder avatar tripleacoder commented on May 23, 2024 1

I get the same error in a Blazor web app, but with SessionStorage instead of LocalStorage, deployed on IIS. It asks for v. 4.0.1.2 but that version is not available so I can not use the workaround...

I have other Blazor apps, running on the same server, using the same version of SessionStorage that are working fine.

I think the error comes from
Microsoft.AspNetCore.Components or
Microsoft.AspNetCore.Components.Web:
dotnet/aspnetcore#22052

After upgrading ASP.NET Core Hosting Bundle on IIS, the error went away:
https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer

Unhandled exception in circuit 'tlnELVghh4tJIeaayOZaV4CHGjBcxk4oeYq68qqsh3I'.

Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Blazored.SessionStorage.SessionStorageService..ctor(IJSRuntime jSRuntime, IOptions1 options) at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope ) at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass5_0.<CreateInitializer>g__Initialize|2(IServiceProvider serviceProvider, IComponent component) at Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateComponent(Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& frame, Int32 parentComponentId) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

from localstorage.

chrissainty avatar chrissainty commented on May 23, 2024

Does this only happen is Azure Functions? I've never tried running a Blazor app from an Azure Function. How does that work?

I'm not sure what to suggest on this one, bit outside my knowledge. I've had very little experience with Functions.

from localstorage.

chrissainty avatar chrissainty commented on May 23, 2024

As there has been no more feedback on this issue I'm going to close it as we can't really do anything.

from localstorage.

hanskcr avatar hanskcr commented on May 23, 2024

Thanks Hoshani. Your suggestion solved the Blazored.LocalStorage "System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json" issue for me.

from localstorage.

bvirkler avatar bvirkler commented on May 23, 2024

I was getting this error too. Not in Azure Functions, just a regular Blazor web app. Strange that the nuget package doesn't pull in System.Text.Json as a dependency.

from localstorage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.