Ask Your Question
1

After loading a dynamic assembly in .NET7, why does the error message "No service for type 'TestPlugins.Plugin1.Service1' has been registered" occur?

asked 2023-03-11 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-07 15:00:00 +0000

woof gravatar image

This error message occurs because the assembly is trying to use a service (in this case, 'TestPlugins.Plugin1.Service1') that has not been registered with the DI (Dependency Injection) container. The DI container is responsible for creating and managing instances of services and providing them to other parts of the application that need them. Without registering the service with the container, the assembly is unable to create instances of it and therefore throws this error.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-03-11 11:00:00 +0000

Seen: 10 times

Last updated: Nov 07 '22