You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) {}
}
Activity
vinhdev17 commentedon Nov 29, 2025
Hi @jchannon , I created PR#381 to fix this. Please reviewing it