Aspnetcore: Workarounds for @inherits Page<TModel> are causing spooky issues

Created on 4 Mar 2019  ·  3Comments  ·  Source: dotnet/aspnetcore

There is some WIERD stuff going on with using the type object in components.

I suspect this is due to one of the various workarounds that's in place to allow you to write @inherits Foo in _ViewImports.cshtml without a compiler error. I've never understood what's being done for this case and why it's the right solution - and I guess it's time for me to dig into this area.

This is breaking components and my heart. This is in the generated code.

image

There's no TModel in this class, the dictionary is defined as Dictionary<object, ValidationMessageStore>.

Done area-blazor bug

Most helpful comment

Level of spookiness

image

All 3 comments

Level of spookiness

image

@rynowak, if this is something @ajaybhargavb can handle, please reassign.

We think support for _Imports.razor will help here: #6374

Was this page helpful?
0 / 5 - 0 ratings

Related issues

guardrex picture guardrex  ·  3Comments

FourLeafClover picture FourLeafClover  ·  3Comments

farhadibehnam picture farhadibehnam  ·  3Comments

groogiam picture groogiam  ·  3Comments

BrennanConroy picture BrennanConroy  ·  3Comments