Dependency Injection Does Not Work #37357
Labels
docs-experience
Indicates issues that are about the learn.microsoft.com experience or design [org][type][category]
dotnet-orleans/svc
Pri3
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Type of issue
Code doesn't work
Description
Page: https://learn.microsoft.com/en-us/dotnet/orleans/host/client?pivots=orleans-7-0
Issue: Dependency Injection Section
Error: error CS7036: There is no argument given that corresponds to the required parameter 'services' of 'ClientBuilder.ClientBuilder(IServiceCollection)'
Code that Doesn't work:
public ClusterClientHostedService(ILoggerProvider loggerProvider)
{
Client = new ClientBuilder()
.UseLocalhostClustering()
.ConfigureLogging(builder => builder.AddProvider(loggerProvider))
.Build();
}
[Enter feedback here]
Page URL
https://learn.microsoft.com/en-us/dotnet/orleans/tutorials-and-samples/tutorial-1
Content source URL
https://github.com/dotnet/docs/blob/main/docs/orleans/tutorials-and-samples/tutorial-1.md
Document Version Independent Id
b61f5003-091e-e698-982b-124316d7eba3
Article author
IEvangelist
Associated WorkItem - 169716
The text was updated successfully, but these errors were encountered: