Skip to content

[Blazor .Net 8 RC2] Not able to register services in Wasm client project #51432

@Ghevi

Description

@Ghevi

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Sorry if I've missed any issue talking about this or if I'm messing something up, but as you can try by downloading the repo I've provided, when I register a service in Program.cs of the client project and try to inject it in the Home.razor component page, I get the error that there is no service of that type registered. Here it's says that it should be possible:
https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/dependency-injection?view=aspnetcore-8.0

Screenshot 2023-10-17 093507

Expected Behavior

Registering services client side should work

Steps To Reproduce

https://github.com/Ghevi/BlazorApp12

Exceptions (if any)

No response

.NET Version

8.0.100-rc.2.23502.2

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions