danroth27 / Net8BlazorWebAssembly

ASP.NET Core hosted Blazor WebAssembly app with .NET 8
MIT License
31 stars 8 forks source link

'Host': static types cannot be used as type arguments (CS0718) #2

Closed Webreaper closed 1 year ago

Webreaper commented 1 year ago

On the last step, when adding this line:

        app.MapRazorComponents<Host>().AddWebAssemblyRenderMode();

I get the following error:

...   /Damselfly/Damselfly.Web.Server/Program.cs(13,13): Error CS0718: 'Host': static types 
                   cannot be used as type arguments (CS0718) (Damselfly.Web.Server)

Any ideas?!

Webreaper commented 1 year ago

Ah, got it. Looks like I missed the fact that Host has been aliased to the Client Host class:

using Host = Damselfly.Web.Client.Host;