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
Entity Framework considerations with Blazor in Preview 7 #15833
Comments
From @ericstj on Thursday, July 25, 2019 7:57:04 PM From https://github.com/dotnet/corefx/issues/39767. @JoelW187 commented Just installed Core 3 preview 7 and created a test Blazor app using the default templates. When targeting the client at ".NET Standard 2.0" the application runs and works as expected. When targeting ".NET Standard 2.1" the app compiles and launches but after loading the framework libraries (mono and webassembly) the exception below is thrown and the app stops. I'm using blazor.webassembly.js:1 WASM: System.AggregateException: One or more errors occurred. (VTable setup of type System.Text.Json.Utf8JsonWriter failed) ---> System.TypeLoadException: VTable setup of type System.Text.Json.Utf8JsonWriter failed @ericstj commented @pranavkm @danroth27 should this go to blazor? Looks like it's having trouble with Utf8JsonWriter. It's a sealed type that implements 2 interfaces: IDisposable and IAsyncDisposable. I'm guessing its having trouble with IAsyncDisposable. The NETStandard implementation of System.Text.Json depends on the out-of-band definition of IAsyncDisposable, which will require the facade that forwards this to netstandard.dll. Blazor should be able to see these. Chatted with @danroth27 and he mentioned that this could be due to mono lagging in netstandard2.1 support. I can imagine that if they were missing a typeforward in netstandard.dll for IAsyncDisposable this could happen. |
@danroth27 |
/cc @marek-safar |
I got the issue after upgraded to .NET Core 3.0 Preview 7 as well
|
.NET Core 3.0/netstandard2.1 will be released in two weeks, any updates on this issue? Will it be fixed until then? |
We haven't completed the API audit but most APIs should be available increasing likelihood of this working on out of the box with the latest release. |
@marek-safar
with
I did
changed the Shared and Client to
And I get the same error as above #15833 (comment) |
@lewing do you know if P9 pulled the latest update from us and do we ship them the hotfix we made for the missing attribute types? |
From @owaits on Thursday, July 25, 2019 2:32:05 PM
When you upgrade to the Preview 7 version of Entity Framework you get a compiler error which indicates you must upgrade to .netstandard2.1. If you do this on a Blazor project and then run the project you get the following error when trying to deserialize JSON.
WASM: System.AggregateException: One or more errors occurred. (VTable setup of type System.Text.Json.Utf8JsonWriter failed)
This makes sense as Blazor does not support .netstandard2.1. So you have to go back to .netstandard2.0 and downgrade Entity Framework to Preview 5 which seems to be the last version of Entity Framework you can use in a Blazor project.
I am just flagging this to help other users and maybe to raise awareness that this may be a problem going forwards as I would expect people to install the latest packages when using Entity Framework.
Copied from original issue: dotnet/aspnetcore#12568
The text was updated successfully, but these errors were encountered: