-
-
Notifications
You must be signed in to change notification settings - Fork 195
Closed
Description
Problem
When creating a module using Carter 10.0.0, the class that inherits from ICarterModule must be declared as public.
If I declare it as internal, the Carter framework does not discover or register the module automatically, leading to missing endpoints.
Expected Behavior
ICarterModule should be discoverable even when declared as internal, or the documentation should clearly state that modules must be public.
Actual Behavior
Declaring the module as internal results in no routes being registered.
Changing the module to public fixes the issue.
// This does NOT work — module is not picked up
internal class UserModule : ICarterModule
{
public void AddRoutes(IEndpointRouteBuilder app) {}
}
// This works
public class UserModule : ICarterModule
{
public void AddRoutes(IEndpointRouteBuilder app) {}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels