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

"Field not found: 'Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame.FrameType'." #267

Closed
RonSijm opened this issue Nov 25, 2020 · 3 comments

Comments

@RonSijm
Copy link

RonSijm commented Nov 25, 2020

Hey there. I just found this library and I was trying to use it on my Blazor project.

However on initializing var component = RenderComponent<Markdown>(); I'm getting this exception:

System.MissingFieldException: 'Field not found:     
'Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame.FrameType'.'

Stacktrace:

at Bunit.Rendering.TestRenderer.GetComponent[TComponent](Int32 rootComponentId)
at Bunit.Rendering.TestRenderer.FindComponent[TComponent](Int32 parentComponentId)
at Bunit.Rendering.TestRenderer.RenderComponent[TComponent](IEnumerable`1 parameters)
at Bunit.TestContext.RenderComponent[TComponent](ComponentParameter[] parameters)
at RonSijm.Screens.TestWithBunit.<TestDownloadRendering>d__0.MoveNext() in 

Version info:

  • Library version: 1.0.0-beta-11-g43328f7f34
  • .NET Core/Blazor version: 5.0.0 (Latest stable)

I googled the issue, and I assume that it's related to this issue:
dotnet/aspnetcore#25727

I tried it with a couple really small components, and I get the same exception with all of them. So I started assuming its a library issue

@egil
Copy link
Member

egil commented Nov 25, 2020

Hi @RonSijm

Try changing you bunit version to just beta-11. You are using a early nightly release of beta 11 that didn't have support for .NET5.

@RonSijm
Copy link
Author

RonSijm commented Nov 25, 2020

Ah thanks for the quick response. I got that version from the nuget-ui installing preview packages, so figured it would be the lastest, hehe.

I don't have that error anymore, though now I'm getting a NullReferenceException somewhere during

Bunit.Rendering.TestRenderer.ProcessPendingRender()	C#
Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(componentId = 0, renderFragment = {Method = {System.Reflection.RuntimeMethodInfo}})	Unknown
Microsoft.AspNetCore.Components.RenderHandle.Render(renderFragment = {Method = {System.Reflection.RuntimeMethodInfo}})	Unknown
Bunit.Rendering.WrapperComponent.Render()	C#
Bunit.Rendering.TestRenderer.Render.AnonymousMethod__0()	C#

I'll try running bunit for source to see if I can figure out why.. hehe

@egil
Copy link
Member

egil commented Nov 25, 2020

OK, ill close this issue for now then :)

@egil egil closed this as completed Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants