codecentric / net_automatic_interface

.Net Source Generator for Automatic Interfaces
MIT License
62 stars 14 forks source link

Not playing nice with .razor files in Blazor #23

Open itniels opened 10 months ago

itniels commented 10 months ago

I am currently developing a Blazor-Server app where I inject interfaces, but when using them in the razor code it seems to not understand where they are, it just throws a compiler errors thinking that they are two different things, see this example:

@inject IMyThing myThing

<SomeComponent Thing="@myThing" />   <--- Throws error " Argument 1: Cannot convert from MyApp.BL.Provider.IMyThing to IMyThing"
ChristianSauer commented 9 months ago

Can you write a minimal reproducible sample? Would be glad to debug but I have no idea how to setup your project.